@Only-api
@Post
@Get
@Delete
@MedicationAdministration
Feature: Medication Administration resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific MedicationAdministration node. This resource is part of the Chemotherapy.
File name: xah.feature
Relative path: api/xah.feature
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:24.525 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB01",
"display": "Etoposide"
}
]
},
"effectivePeriod": {
"start": "2012-12-05",
"end": "2012-10-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:25.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:25.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kpA4d7DHKP3NnW1F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14720/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14720/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:25.136 [print] {
"resourceType": "MedicationAdministration",
"id": "14720",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:29.822+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB01",
"display": "Etoposide"
}
]
},
"effectivePeriod": {
"start": "2012-12-05",
"end": "2012-10-25"
}
}
> *
print COOKIES
10:18:25.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:25.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:25.138 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kpA4d7DHKP3NnW1F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14720/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14720/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:25.138 [print] {
"resourceType": "MedicationAdministration",
"id": "14720",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:29.822+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB01",
"display": "Etoposide"
}
]
},
"effectivePeriod": {
"start": "2012-12-05",
"end": "2012-10-25"
}
}
> *
print COOKIES
10:18:25.138 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:25.753 [print] {
"resourceType": "MedicationAdministration",
"id": "14720",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:29.822+02:00",
"source": "#kpA4d7DHKP3NnW1F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB01",
"display": "Etoposide"
}
]
},
"effectivePeriod": {
"start": "2012-12-05",
"end": "2012-10-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:26.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:26.954 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:31.081+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:31.081+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:26.955 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX08",
"display": "Pentostatina"
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2013-05-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:27.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:27.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d71oMBfpnSRA6L7u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14721/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14721/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:27.547 [print] {
"resourceType": "MedicationAdministration",
"id": "14721",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:32.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX08",
"display": "Pentostatina"
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2013-05-24"
}
}
> *
print COOKIES
10:18:27.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:27.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:27.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d71oMBfpnSRA6L7u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14721/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14721/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:27.547 [print] {
"resourceType": "MedicationAdministration",
"id": "14721",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:32.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX08",
"display": "Pentostatina"
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2013-05-24"
}
}
> *
print COOKIES
10:18:27.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:28.173 [print] {
"resourceType": "MedicationAdministration",
"id": "14721",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:32.244+02:00",
"source": "#d71oMBfpnSRA6L7u",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX08",
"display": "Pentostatina"
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2013-05-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:28.810 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:29.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:33.524+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:33.524+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:29.469 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA02",
"display": "Filgrastim"
}
]
},
"effectivePeriod": {
"start": "2013-04-29",
"end": "2013-07-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:30.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:30.063 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IEQTTiH4ZI25GjDp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14722/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14722/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:30.063 [print] {
"resourceType": "MedicationAdministration",
"id": "14722",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:34.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA02",
"display": "Filgrastim"
}
]
},
"effectivePeriod": {
"start": "2013-04-29",
"end": "2013-07-15"
}
}
> *
print COOKIES
10:18:30.063 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:30.063 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:30.063 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IEQTTiH4ZI25GjDp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14722/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14722/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:30.063 [print] {
"resourceType": "MedicationAdministration",
"id": "14722",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:34.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA02",
"display": "Filgrastim"
}
]
},
"effectivePeriod": {
"start": "2013-04-29",
"end": "2013-07-15"
}
}
> *
print COOKIES
10:18:30.063 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:30.683 [print] {
"resourceType": "MedicationAdministration",
"id": "14722",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:34.761+02:00",
"source": "#IEQTTiH4ZI25GjDp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA02",
"display": "Filgrastim"
}
]
},
"effectivePeriod": {
"start": "2013-04-29",
"end": "2013-07-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:31.310 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:32.021 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:36.015+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:36.015+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:32.022 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX25",
"display": "Bexarotene"
}
]
},
"effectivePeriod": {
"start": "2014-01-16",
"end": "2013-07-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:32.639 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:32.639 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qu6O7nAa5lkMV5U0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14723/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14723/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:32.640 [print] {
"resourceType": "MedicationAdministration",
"id": "14723",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:37.348+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX25",
"display": "Bexarotene"
}
]
},
"effectivePeriod": {
"start": "2014-01-16",
"end": "2013-07-29"
}
}
> *
print COOKIES
10:18:32.640 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:32.642 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:32.642 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qu6O7nAa5lkMV5U0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14723/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14723/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:32.642 [print] {
"resourceType": "MedicationAdministration",
"id": "14723",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:37.348+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX25",
"display": "Bexarotene"
}
]
},
"effectivePeriod": {
"start": "2014-01-16",
"end": "2013-07-29"
}
}
> *
print COOKIES
10:18:32.642 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:33.263 [print] {
"resourceType": "MedicationAdministration",
"id": "14723",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:37.348+02:00",
"source": "#Qu6O7nAa5lkMV5U0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX25",
"display": "Bexarotene"
}
]
},
"effectivePeriod": {
"start": "2014-01-16",
"end": "2013-07-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:33.887 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:34.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:38.593+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:38.593+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:34.525 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE09",
"display": "Temsirolimus"
}
]
},
"effectivePeriod": {
"start": "2014-01-24",
"end": "2013-10-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:35.366 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:35.366 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GPKbmygsr359HCHx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14724/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14724/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:35.366 [print] {
"resourceType": "MedicationAdministration",
"id": "14724",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:40.071+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE09",
"display": "Temsirolimus"
}
]
},
"effectivePeriod": {
"start": "2014-01-24",
"end": "2013-10-16"
}
}
> *
print COOKIES
10:18:35.366 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:35.368 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:35.368 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GPKbmygsr359HCHx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14724/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14724/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:35.368 [print] {
"resourceType": "MedicationAdministration",
"id": "14724",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:40.071+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE09",
"display": "Temsirolimus"
}
]
},
"effectivePeriod": {
"start": "2014-01-24",
"end": "2013-10-16"
}
}
> *
print COOKIES
10:18:35.368 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:35.963 [print] {
"resourceType": "MedicationAdministration",
"id": "14724",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:40.071+02:00",
"source": "#GPKbmygsr359HCHx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE09",
"display": "Temsirolimus"
}
]
},
"effectivePeriod": {
"start": "2014-01-24",
"end": "2013-10-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:36.613 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 29ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 29ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:37.236 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:41.298+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:41.298+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:37.238 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC08",
"display": "Panitumumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-28",
"end": "2014-03-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:37.820 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:37.820 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mPOT360nauM8OV5t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14725/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14725/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:37.820 [print] {
"resourceType": "MedicationAdministration",
"id": "14725",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:42.529+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC08",
"display": "Panitumumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-28",
"end": "2014-03-07"
}
}
> *
print COOKIES
10:18:37.820 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:37.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:37.822 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mPOT360nauM8OV5t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14725/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14725/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:37.822 [print] {
"resourceType": "MedicationAdministration",
"id": "14725",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:42.529+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC08",
"display": "Panitumumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-28",
"end": "2014-03-07"
}
}
> *
print COOKIES
10:18:37.822 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:38.415 [print] {
"resourceType": "MedicationAdministration",
"id": "14725",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:42.529+02:00",
"source": "#mPOT360nauM8OV5t",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC08",
"display": "Panitumumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-28",
"end": "2014-03-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:39.136 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:39.738 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:43.773+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:43.773+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:39.738 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX05",
"display": "Pidotimod"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2014-05-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:40.357 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:40.357 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A61sV3ztGPC7Irau"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14726/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14726/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:40.357 [print] {
"resourceType": "MedicationAdministration",
"id": "14726",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:45.040+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX05",
"display": "Pidotimod"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2014-05-13"
}
}
> *
print COOKIES
10:18:40.357 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:40.357 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:40.357 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A61sV3ztGPC7Irau"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14726/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14726/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:40.357 [print] {
"resourceType": "MedicationAdministration",
"id": "14726",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:45.040+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX05",
"display": "Pidotimod"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2014-05-13"
}
}
> *
print COOKIES
10:18:40.357 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:40.965 [print] {
"resourceType": "MedicationAdministration",
"id": "14726",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:45.040+02:00",
"source": "#A61sV3ztGPC7Irau",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX05",
"display": "Pidotimod"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2014-05-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:41.583 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:42.249 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:46.290+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:46.290+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:42.249 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB04",
"display": "Enzalutamide"
}
]
},
"effectivePeriod": {
"start": "2014-06-05",
"end": "2014-05-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:42.828 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:42.828 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k9kvDlgtCajTNXD8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14727/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14727/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:42.828 [print] {
"resourceType": "MedicationAdministration",
"id": "14727",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:47.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB04",
"display": "Enzalutamide"
}
]
},
"effectivePeriod": {
"start": "2014-06-05",
"end": "2014-05-30"
}
}
> *
print COOKIES
10:18:42.832 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:42.832 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:42.832 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k9kvDlgtCajTNXD8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14727/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14727/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:42.832 [print] {
"resourceType": "MedicationAdministration",
"id": "14727",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:47.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB04",
"display": "Enzalutamide"
}
]
},
"effectivePeriod": {
"start": "2014-06-05",
"end": "2014-05-30"
}
}
> *
print COOKIES
10:18:42.832 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:43.429 [print] {
"resourceType": "MedicationAdministration",
"id": "14727",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:47.527+02:00",
"source": "#k9kvDlgtCajTNXD8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB04",
"display": "Enzalutamide"
}
]
},
"effectivePeriod": {
"start": "2014-06-05",
"end": "2014-05-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:44.015 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:44.864 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:48.716+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:48.716+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:44.864 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX05",
"display": "Hydroxycarbamide"
}
]
},
"effectivePeriod": {
"start": "2014-07-22",
"end": "2014-09-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:45.490 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:45.490 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kl9bAlrTpnLzQAuD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14728/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14728/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:45.490 [print] {
"resourceType": "MedicationAdministration",
"id": "14728",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:50.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX05",
"display": "Hydroxycarbamide"
}
]
},
"effectivePeriod": {
"start": "2014-07-22",
"end": "2014-09-30"
}
}
> *
print COOKIES
10:18:45.490 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:45.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:45.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kl9bAlrTpnLzQAuD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14728/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14728/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:45.493 [print] {
"resourceType": "MedicationAdministration",
"id": "14728",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:50.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX05",
"display": "Hydroxycarbamide"
}
]
},
"effectivePeriod": {
"start": "2014-07-22",
"end": "2014-09-30"
}
}
> *
print COOKIES
10:18:45.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:46.099 [print] {
"resourceType": "MedicationAdministration",
"id": "14728",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:50.189+02:00",
"source": "#Kl9bAlrTpnLzQAuD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX05",
"display": "Hydroxycarbamide"
}
]
},
"effectivePeriod": {
"start": "2014-07-22",
"end": "2014-09-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:46.697 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:47.275 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:51.409+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:51.409+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:47.276 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX13",
"display": "Glatiramer "
}
]
},
"effectivePeriod": {
"start": "2014-08-01",
"end": "2014-10-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:47.879 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:47.879 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SIj061rgKMnjsacO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14729/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14729/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:47.879 [print] {
"resourceType": "MedicationAdministration",
"id": "14729",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:52.575+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX13",
"display": "Glatiramer "
}
]
},
"effectivePeriod": {
"start": "2014-08-01",
"end": "2014-10-08"
}
}
> *
print COOKIES
10:18:47.879 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:47.881 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:47.881 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SIj061rgKMnjsacO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14729/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14729/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:47.881 [print] {
"resourceType": "MedicationAdministration",
"id": "14729",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:52.575+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX13",
"display": "Glatiramer "
}
]
},
"effectivePeriod": {
"start": "2014-08-01",
"end": "2014-10-08"
}
}
> *
print COOKIES
10:18:47.881 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:48.512 [print] {
"resourceType": "MedicationAdministration",
"id": "14729",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:52.575+02:00",
"source": "#SIj061rgKMnjsacO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX13",
"display": "Glatiramer "
}
]
},
"effectivePeriod": {
"start": "2014-08-01",
"end": "2014-10-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:49.134 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:49.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:53.837+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:53.837+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:49.731 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timomudulina"
}
]
},
"effectivePeriod": {
"start": "2014-08-26",
"end": "2014-10-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:50.380 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:50.380 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p6maKYMVIF9xiIKs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14730/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14730/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:50.380 [print] {
"resourceType": "MedicationAdministration",
"id": "14730",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:55.089+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timomudulina"
}
]
},
"effectivePeriod": {
"start": "2014-08-26",
"end": "2014-10-21"
}
}
> *
print COOKIES
10:18:50.380 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:50.381 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:50.381 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p6maKYMVIF9xiIKs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14730/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14730/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:50.381 [print] {
"resourceType": "MedicationAdministration",
"id": "14730",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:55.089+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timomudulina"
}
]
},
"effectivePeriod": {
"start": "2014-08-26",
"end": "2014-10-21"
}
}
> *
print COOKIES
10:18:50.381 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:50.970 [print] {
"resourceType": "MedicationAdministration",
"id": "14730",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:55.089+02:00",
"source": "#p6maKYMVIF9xiIKs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timomudulina"
}
]
},
"effectivePeriod": {
"start": "2014-08-26",
"end": "2014-10-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:51.622 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:52.208 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:56.328+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:56.328+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:52.209 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE21",
"display": "Regorafenib"
}
]
},
"effectivePeriod": {
"start": "2014-09-04",
"end": "2014-11-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:53.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:53.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6fmpsVHkxKUiL7ZA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14731/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14731/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:53.229 [print] {
"resourceType": "MedicationAdministration",
"id": "14731",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:57.936+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE21",
"display": "Regorafenib"
}
]
},
"effectivePeriod": {
"start": "2014-09-04",
"end": "2014-11-06"
}
}
> *
print COOKIES
10:18:53.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:53.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:53.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6fmpsVHkxKUiL7ZA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14731/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:18:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14731/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:18:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:53.229 [print] {
"resourceType": "MedicationAdministration",
"id": "14731",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:57.936+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE21",
"display": "Regorafenib"
}
]
},
"effectivePeriod": {
"start": "2014-09-04",
"end": "2014-11-06"
}
}
> *
print COOKIES
10:18:53.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:53.891 [print] {
"resourceType": "MedicationAdministration",
"id": "14731",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:18:57.936+02:00",
"source": "#6fmpsVHkxKUiL7ZA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE21",
"display": "Regorafenib"
}
]
},
"effectivePeriod": {
"start": "2014-09-04",
"end": "2014-11-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:54.504 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:55.129 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:18:59.206+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:18:59.206+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:55.129 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD06",
"display": "Efaproxiral"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-04-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:55.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:55.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BZO2xip29edAozDa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14732/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14732/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:55.730 [print] {
"resourceType": "MedicationAdministration",
"id": "14732",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:00.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD06",
"display": "Efaproxiral"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-04-09"
}
}
> *
print COOKIES
10:18:55.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:55.735 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:55.735 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BZO2xip29edAozDa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14732/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14732/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:55.735 [print] {
"resourceType": "MedicationAdministration",
"id": "14732",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:00.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD06",
"display": "Efaproxiral"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-04-09"
}
}
> *
print COOKIES
10:18:55.735 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:56.293 [print] {
"resourceType": "MedicationAdministration",
"id": "14732",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:00.441+02:00",
"source": "#BZO2xip29edAozDa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD06",
"display": "Efaproxiral"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-04-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:56.928 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:57.553 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:01.625+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:01.625+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:18:57.553 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX03",
"display": "Temozolomide"
}
]
},
"effectivePeriod": {
"start": "2015-02-04",
"end": "2015-06-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:58.196 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:58.196 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sZffdBulO1uLEvil"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14733/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14733/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:58.196 [print] {
"resourceType": "MedicationAdministration",
"id": "14733",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:02.912+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX03",
"display": "Temozolomide"
}
]
},
"effectivePeriod": {
"start": "2015-02-04",
"end": "2015-06-22"
}
}
> *
print COOKIES
10:18:58.196 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:18:58.196 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:18:58.196 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sZffdBulO1uLEvil"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14733/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14733/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:18:58.196 [print] {
"resourceType": "MedicationAdministration",
"id": "14733",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:02.912+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX03",
"display": "Temozolomide"
}
]
},
"effectivePeriod": {
"start": "2015-02-04",
"end": "2015-06-22"
}
}
> *
print COOKIES
10:18:58.196 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:18:58.823 [print] {
"resourceType": "MedicationAdministration",
"id": "14733",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:02.912+02:00",
"source": "#sZffdBulO1uLEvil",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX03",
"display": "Temozolomide"
}
]
},
"effectivePeriod": {
"start": "2015-02-04",
"end": "2015-06-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:18:59.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:18:59.999 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:04.136+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:04.136+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:00.014 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX22",
"display": "Alitretinoina"
}
]
},
"effectivePeriod": {
"start": "2015-05-12",
"end": "2015-10-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:00.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:00.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rf1lK9qvXjtAO5Wl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14734/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14734/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:00.600 [print] {
"resourceType": "MedicationAdministration",
"id": "14734",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:05.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX22",
"display": "Alitretinoina"
}
]
},
"effectivePeriod": {
"start": "2015-05-12",
"end": "2015-10-05"
}
}
> *
print COOKIES
10:19:00.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:00.602 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:00.602 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rf1lK9qvXjtAO5Wl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14734/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14734/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:00.602 [print] {
"resourceType": "MedicationAdministration",
"id": "14734",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:05.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX22",
"display": "Alitretinoina"
}
]
},
"effectivePeriod": {
"start": "2015-05-12",
"end": "2015-10-05"
}
}
> *
print COOKIES
10:19:00.602 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:01.191 [print] {
"resourceType": "MedicationAdministration",
"id": "14734",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:05.299+02:00",
"source": "#rf1lK9qvXjtAO5Wl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX22",
"display": "Alitretinoina"
}
]
},
"effectivePeriod": {
"start": "2015-05-12",
"end": "2015-10-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:02.227 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:02.864 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:06.939+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:06.939+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:02.864 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE18",
"display": "Ruxolitinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-10-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:03.489 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:03.489 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"be7Oy6zfsCQYC2ku"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14735/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14735/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:03.489 [print] {
"resourceType": "MedicationAdministration",
"id": "14735",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:08.199+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE18",
"display": "Ruxolitinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-10-29"
}
}
> *
print COOKIES
10:19:03.489 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:03.491 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:03.491 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"be7Oy6zfsCQYC2ku"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14735/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14735/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:03.491 [print] {
"resourceType": "MedicationAdministration",
"id": "14735",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:08.199+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE18",
"display": "Ruxolitinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-10-29"
}
}
> *
print COOKIES
10:19:03.491 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:04.328 [print] {
"resourceType": "MedicationAdministration",
"id": "14735",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:08.199+02:00",
"source": "#be7Oy6zfsCQYC2ku",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE18",
"display": "Ruxolitinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-10-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:04.968 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:05.546 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:09.676+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:09.676+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:05.546 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA31",
"display": "Teriflunomide"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-10-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:06.172 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:06.172 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AOim8K7spGx3ME3R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14736/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14736/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:06.172 [print] {
"resourceType": "MedicationAdministration",
"id": "14736",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:10.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA31",
"display": "Teriflunomide"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-10-30"
}
}
> *
print COOKIES
10:19:06.172 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:06.172 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:06.172 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AOim8K7spGx3ME3R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14736/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14736/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:06.172 [print] {
"resourceType": "MedicationAdministration",
"id": "14736",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:10.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA31",
"display": "Teriflunomide"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-10-30"
}
}
> *
print COOKIES
10:19:06.172 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:06.965 [print] {
"resourceType": "MedicationAdministration",
"id": "14736",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:10.878+02:00",
"source": "#AOim8K7spGx3ME3R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA31",
"display": "Teriflunomide"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-10-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:07.559 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:08.175 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:12.274+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:12.274+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:08.175 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG06",
"display": "Exemestano"
}
]
},
"effectivePeriod": {
"start": "2015-12-30",
"end": "2016-02-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:09.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:09.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c7CpXcd7A3Gaw4w0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14737/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14737/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:09.760 [print] {
"resourceType": "MedicationAdministration",
"id": "14737",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:14.472+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG06",
"display": "Exemestano"
}
]
},
"effectivePeriod": {
"start": "2015-12-30",
"end": "2016-02-12"
}
}
> *
print COOKIES
10:19:09.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:09.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:09.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c7CpXcd7A3Gaw4w0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14737/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14737/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:09.760 [print] {
"resourceType": "MedicationAdministration",
"id": "14737",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:14.472+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG06",
"display": "Exemestano"
}
]
},
"effectivePeriod": {
"start": "2015-12-30",
"end": "2016-02-12"
}
}
> *
print COOKIES
10:19:09.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:10.371 [print] {
"resourceType": "MedicationAdministration",
"id": "14737",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:14.472+02:00",
"source": "#c7CpXcd7A3Gaw4w0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG06",
"display": "Exemestano"
}
]
},
"effectivePeriod": {
"start": "2015-12-30",
"end": "2016-02-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:10.998 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:11.644 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:15.710+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:15.710+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:11.644 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD03",
"display": "Metil 5-aminolevulinato"
}
]
},
"effectivePeriod": {
"start": "2016-02-16",
"end": "2016-06-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:12.249 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:12.249 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MIRwFJG6pP03nNum"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14738/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14738/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:12.249 [print] {
"resourceType": "MedicationAdministration",
"id": "14738",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:16.955+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD03",
"display": "Metil 5-aminolevulinato"
}
]
},
"effectivePeriod": {
"start": "2016-02-16",
"end": "2016-06-01"
}
}
> *
print COOKIES
10:19:12.249 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:12.250 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:12.250 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MIRwFJG6pP03nNum"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14738/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14738/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:12.250 [print] {
"resourceType": "MedicationAdministration",
"id": "14738",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:16.955+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD03",
"display": "Metil 5-aminolevulinato"
}
]
},
"effectivePeriod": {
"start": "2016-02-16",
"end": "2016-06-01"
}
}
> *
print COOKIES
10:19:12.250 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:12.880 [print] {
"resourceType": "MedicationAdministration",
"id": "14738",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:16.955+02:00",
"source": "#MIRwFJG6pP03nNum",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD03",
"display": "Metil 5-aminolevulinato"
}
]
},
"effectivePeriod": {
"start": "2016-02-16",
"end": "2016-06-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:13.495 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:14.120 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:18.208+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:18.208+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:14.120 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE08",
"display": "Nilotinib "
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-06-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:14.705 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:14.705 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3QCumeVxDXx4yAdZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14739/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14739/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:14.705 [print] {
"resourceType": "MedicationAdministration",
"id": "14739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:19.405+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE08",
"display": "Nilotinib "
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-06-17"
}
}
> *
print COOKIES
10:19:14.705 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:14.705 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:14.705 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3QCumeVxDXx4yAdZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14739/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14739/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:14.705 [print] {
"resourceType": "MedicationAdministration",
"id": "14739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:19.405+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE08",
"display": "Nilotinib "
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-06-17"
}
}
> *
print COOKIES
10:19:14.705 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:15.308 [print] {
"resourceType": "MedicationAdministration",
"id": "14739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:19.405+02:00",
"source": "#3QCumeVxDXx4yAdZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE08",
"display": "Nilotinib "
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-06-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:16.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:16.711 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:20.643+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:20.643+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:16.711 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA02",
"display": "Vincristina"
}
]
},
"effectivePeriod": {
"start": "2017-02-24",
"end": "2016-09-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:17.311 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:17.311 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"06dkFhOzwc1kyDSc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14740/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14740/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:17.311 [print] {
"resourceType": "MedicationAdministration",
"id": "14740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:22.020+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA02",
"display": "Vincristina"
}
]
},
"effectivePeriod": {
"start": "2017-02-24",
"end": "2016-09-30"
}
}
> *
print COOKIES
10:19:17.312 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:17.313 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:17.313 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"06dkFhOzwc1kyDSc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14740/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14740/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:17.313 [print] {
"resourceType": "MedicationAdministration",
"id": "14740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:22.020+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA02",
"display": "Vincristina"
}
]
},
"effectivePeriod": {
"start": "2017-02-24",
"end": "2016-09-30"
}
}
> *
print COOKIES
10:19:17.313 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:17.880 [print] {
"resourceType": "MedicationAdministration",
"id": "14740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:22.020+02:00",
"source": "#06dkFhOzwc1kyDSc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA02",
"display": "Vincristina"
}
]
},
"effectivePeriod": {
"start": "2017-02-24",
"end": "2016-09-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:18.531 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:19.184 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:23.239+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:23.239+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:19.200 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX04",
"display": "Dacarbazina"
}
]
},
"effectivePeriod": {
"start": "2017-06-05",
"end": "2017-05-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:19.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:19.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bm44dZUiZ0ZSp3Od"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14741/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14741/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:19.821 [print] {
"resourceType": "MedicationAdministration",
"id": "14741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:24.521+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX04",
"display": "Dacarbazina"
}
]
},
"effectivePeriod": {
"start": "2017-06-05",
"end": "2017-05-08"
}
}
> *
print COOKIES
10:19:19.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:19.823 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:19.824 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bm44dZUiZ0ZSp3Od"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14741/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14741/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:19.824 [print] {
"resourceType": "MedicationAdministration",
"id": "14741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:24.521+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX04",
"display": "Dacarbazina"
}
]
},
"effectivePeriod": {
"start": "2017-06-05",
"end": "2017-05-08"
}
}
> *
print COOKIES
10:19:19.824 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:20.396 [print] {
"resourceType": "MedicationAdministration",
"id": "14741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:24.521+02:00",
"source": "#bm44dZUiZ0ZSp3Od",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX04",
"display": "Dacarbazina"
}
]
},
"effectivePeriod": {
"start": "2017-06-05",
"end": "2017-05-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:21.227 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:21.827 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:25.939+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:25.939+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:21.829 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC01",
"display": "Edrecolomab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2017-05-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:22.464 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:22.464 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m9t2KzISI1QdazSg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14742/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14742/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:22.464 [print] {
"resourceType": "MedicationAdministration",
"id": "14742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:27.169+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC01",
"display": "Edrecolomab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2017-05-22"
}
}
> *
print COOKIES
10:19:22.464 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:22.465 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:22.465 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m9t2KzISI1QdazSg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14742/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14742/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:22.465 [print] {
"resourceType": "MedicationAdministration",
"id": "14742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:27.169+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC01",
"display": "Edrecolomab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2017-05-22"
}
}
> *
print COOKIES
10:19:22.465 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:23.073 [print] {
"resourceType": "MedicationAdministration",
"id": "14742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:27.169+02:00",
"source": "#m9t2KzISI1QdazSg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC01",
"display": "Edrecolomab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2017-05-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:23.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:25.358 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:28.437+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:28.437+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:25.360 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA14",
"display": "Lipegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-08-11",
"end": "2017-11-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:25.969 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"644"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:25.969 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fad252Gxtk13HlOv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14743/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14743/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:25.969 [print] {
"resourceType": "MedicationAdministration",
"id": "14743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:30.678+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA14",
"display": "Lipegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-08-11",
"end": "2017-11-03"
}
}
> *
print COOKIES
10:19:25.969 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:25.971 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"644"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:25.971 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fad252Gxtk13HlOv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14743/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14743/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:25.971 [print] {
"resourceType": "MedicationAdministration",
"id": "14743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:30.678+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA14",
"display": "Lipegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-08-11",
"end": "2017-11-03"
}
}
> *
print COOKIES
10:19:25.971 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:26.579 [print] {
"resourceType": "MedicationAdministration",
"id": "14743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:30.678+02:00",
"source": "#Fad252Gxtk13HlOv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA14",
"display": "Lipegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-08-11",
"end": "2017-11-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:27.180 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:27.819 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:31.889+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:31.889+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:27.820 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD02",
"display": "Lomustina"
}
]
},
"effectivePeriod": {
"start": "2017-12-06",
"end": "2017-11-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:28.430 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:28.430 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"govhZEgZ05Pd806J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14744/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14744/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:28.430 [print] {
"resourceType": "MedicationAdministration",
"id": "14744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:33.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD02",
"display": "Lomustina"
}
]
},
"effectivePeriod": {
"start": "2017-12-06",
"end": "2017-11-13"
}
}
> *
print COOKIES
10:19:28.430 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:28.430 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:28.430 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"govhZEgZ05Pd806J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14744/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14744/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:28.430 [print] {
"resourceType": "MedicationAdministration",
"id": "14744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:33.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD02",
"display": "Lomustina"
}
]
},
"effectivePeriod": {
"start": "2017-12-06",
"end": "2017-11-13"
}
}
> *
print COOKIES
10:19:28.430 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:29.270 [print] {
"resourceType": "MedicationAdministration",
"id": "14744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:33.138+02:00",
"source": "#govhZEgZ05Pd806J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD02",
"display": "Lomustina"
}
]
},
"effectivePeriod": {
"start": "2017-12-06",
"end": "2017-11-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:29.852 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:31.429 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:34.560+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:34.560+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:31.429 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD01",
"display": "Ciclosporina"
}
]
},
"effectivePeriod": {
"start": "2012-12-11",
"end": "2012-10-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:32.031 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:32.031 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Eq7OQ9Gt3492elGm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14745/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14745/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:32.031 [print] {
"resourceType": "MedicationAdministration",
"id": "14745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:36.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD01",
"display": "Ciclosporina"
}
]
},
"effectivePeriod": {
"start": "2012-12-11",
"end": "2012-10-31"
}
}
> *
print COOKIES
10:19:32.031 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:32.031 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:32.031 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Eq7OQ9Gt3492elGm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14745/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14745/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:32.031 [print] {
"resourceType": "MedicationAdministration",
"id": "14745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:36.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD01",
"display": "Ciclosporina"
}
]
},
"effectivePeriod": {
"start": "2012-12-11",
"end": "2012-10-31"
}
}
> *
print COOKIES
10:19:32.031 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:32.641 [print] {
"resourceType": "MedicationAdministration",
"id": "14745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:36.746+02:00",
"source": "#Eq7OQ9Gt3492elGm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD01",
"display": "Ciclosporina"
}
]
},
"effectivePeriod": {
"start": "2012-12-11",
"end": "2012-10-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:33.272 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:33.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:37.977+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:37.977+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:33.896 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC01",
"display": "Daclizumab"
}
]
},
"effectivePeriod": {
"start": "2013-03-11",
"end": "2013-01-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:34.484 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:34.485 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3bcfJ24QctWPW4Ng"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14746/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14746/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:34.485 [print] {
"resourceType": "MedicationAdministration",
"id": "14746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:39.191+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC01",
"display": "Daclizumab"
}
]
},
"effectivePeriod": {
"start": "2013-03-11",
"end": "2013-01-07"
}
}
> *
print COOKIES
10:19:34.485 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:34.486 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:34.487 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3bcfJ24QctWPW4Ng"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14746/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14746/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:34.487 [print] {
"resourceType": "MedicationAdministration",
"id": "14746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:39.191+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC01",
"display": "Daclizumab"
}
]
},
"effectivePeriod": {
"start": "2013-03-11",
"end": "2013-01-07"
}
}
> *
print COOKIES
10:19:34.487 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:35.059 [print] {
"resourceType": "MedicationAdministration",
"id": "14746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:39.191+02:00",
"source": "#3bcfJ24QctWPW4Ng",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC01",
"display": "Daclizumab"
}
]
},
"effectivePeriod": {
"start": "2013-03-11",
"end": "2013-01-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:35.683 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:36.337 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:40.387+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:40.387+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:36.337 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB02",
"display": "Infliximab"
}
]
},
"effectivePeriod": {
"start": "2013-12-31",
"end": "2013-01-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:36.993 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:36.993 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"evMcpXBcr3jLJJuo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14747/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14747/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:36.993 [print] {
"resourceType": "MedicationAdministration",
"id": "14747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:41.683+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB02",
"display": "Infliximab"
}
]
},
"effectivePeriod": {
"start": "2013-12-31",
"end": "2013-01-29"
}
}
> *
print COOKIES
10:19:36.993 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:37.008 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:37.008 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"evMcpXBcr3jLJJuo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14747/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14747/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:37.008 [print] {
"resourceType": "MedicationAdministration",
"id": "14747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:41.683+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB02",
"display": "Infliximab"
}
]
},
"effectivePeriod": {
"start": "2013-12-31",
"end": "2013-01-29"
}
}
> *
print COOKIES
10:19:37.008 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:37.643 [print] {
"resourceType": "MedicationAdministration",
"id": "14747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:41.683+02:00",
"source": "#evMcpXBcr3jLJJuo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB02",
"display": "Infliximab"
}
]
},
"effectivePeriod": {
"start": "2013-12-31",
"end": "2013-01-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:39.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:39.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:43.971+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:43.971+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:39.838 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB04",
"display": "Interferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2014-01-22",
"end": "2013-08-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:40.429 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:40.429 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g3t2zBrD3Kjf6rWI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14748/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14748/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:40.429 [print] {
"resourceType": "MedicationAdministration",
"id": "14748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:45.150+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB04",
"display": "Interferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2014-01-22",
"end": "2013-08-19"
}
}
> *
print COOKIES
10:19:40.429 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:40.444 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:40.444 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g3t2zBrD3Kjf6rWI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14748/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14748/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:40.444 [print] {
"resourceType": "MedicationAdministration",
"id": "14748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:45.150+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB04",
"display": "Interferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2014-01-22",
"end": "2013-08-19"
}
}
> *
print COOKIES
10:19:40.444 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:41.034 [print] {
"resourceType": "MedicationAdministration",
"id": "14748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:45.150+02:00",
"source": "#g3t2zBrD3Kjf6rWI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB04",
"display": "Interferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2014-01-22",
"end": "2013-08-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:41.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:42.377 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:46.483+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:46.483+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:42.377 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA12",
"display": "Ancestim"
}
]
},
"effectivePeriod": {
"start": "2014-07-07",
"end": "2013-08-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:43.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:43.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NWcl2AdPxsvrwFKR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14749/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14749/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:43.233 [print] {
"resourceType": "MedicationAdministration",
"id": "14749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:47.949+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA12",
"display": "Ancestim"
}
]
},
"effectivePeriod": {
"start": "2014-07-07",
"end": "2013-08-28"
}
}
> *
print COOKIES
10:19:43.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:43.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:43.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NWcl2AdPxsvrwFKR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14749/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14749/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:43.233 [print] {
"resourceType": "MedicationAdministration",
"id": "14749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:47.949+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA12",
"display": "Ancestim"
}
]
},
"effectivePeriod": {
"start": "2014-07-07",
"end": "2013-08-28"
}
}
> *
print COOKIES
10:19:43.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:43.867 [print] {
"resourceType": "MedicationAdministration",
"id": "14749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:47.949+02:00",
"source": "#NWcl2AdPxsvrwFKR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA12",
"display": "Ancestim"
}
]
},
"effectivePeriod": {
"start": "2014-07-07",
"end": "2013-08-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:44.782 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:45.394 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:49.484+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:49.484+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:45.394 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA06",
"display": "Acido micofenolico sale di mofetile"
}
]
},
"effectivePeriod": {
"start": "2014-09-16",
"end": "2014-01-20"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:46.049 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:46.049 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sxSCNa6UdbJfxiEt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14750/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14750/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:46.049 [print] {
"resourceType": "MedicationAdministration",
"id": "14750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:50.751+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA06",
"display": "Acido micofenolico sale di mofetile"
}
]
},
"effectivePeriod": {
"start": "2014-09-16",
"end": "2014-01-20"
}
}
> *
print COOKIES
10:19:46.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:46.049 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:46.049 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sxSCNa6UdbJfxiEt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14750/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14750/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:46.049 [print] {
"resourceType": "MedicationAdministration",
"id": "14750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:50.751+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA06",
"display": "Acido micofenolico sale di mofetile"
}
]
},
"effectivePeriod": {
"start": "2014-09-16",
"end": "2014-01-20"
}
}
> *
print COOKIES
10:19:46.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:46.671 [print] {
"resourceType": "MedicationAdministration",
"id": "14750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:50.751+02:00",
"source": "#sxSCNa6UdbJfxiEt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA06",
"display": "Acido micofenolico sale di mofetile"
}
]
},
"effectivePeriod": {
"start": "2014-09-16",
"end": "2014-01-20"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:47.315 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:47.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:52.004+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:52.004+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:47.896 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA26",
"display": "Belimumab"
}
]
},
"effectivePeriod": {
"start": "2014-10-15",
"end": "2014-03-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:48.564 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:48.564 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qMIkxJSKQgGQ5hl9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14751/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14751/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:48.565 [print] {
"resourceType": "MedicationAdministration",
"id": "14751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:53.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA26",
"display": "Belimumab"
}
]
},
"effectivePeriod": {
"start": "2014-10-15",
"end": "2014-03-12"
}
}
> *
print COOKIES
10:19:48.565 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:48.566 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:48.566 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qMIkxJSKQgGQ5hl9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14751/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14751/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:48.567 [print] {
"resourceType": "MedicationAdministration",
"id": "14751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:53.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA26",
"display": "Belimumab"
}
]
},
"effectivePeriod": {
"start": "2014-10-15",
"end": "2014-03-12"
}
}
> *
print COOKIES
10:19:48.567 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:49.201 [print] {
"resourceType": "MedicationAdministration",
"id": "14751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:53.244+02:00",
"source": "#qMIkxJSKQgGQ5hl9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA26",
"display": "Belimumab"
}
]
},
"effectivePeriod": {
"start": "2014-10-15",
"end": "2014-03-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:49.824 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:50.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:54.531+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:54.531+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:50.396 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX01",
"display": "Mitobronitol"
}
]
},
"effectivePeriod": {
"start": "2014-12-01",
"end": "2014-05-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:50.973 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:50.973 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qTlTpoAz5ULPgdjU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14752/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14752/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:50.973 [print] {
"resourceType": "MedicationAdministration",
"id": "14752",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:55.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX01",
"display": "Mitobronitol"
}
]
},
"effectivePeriod": {
"start": "2014-12-01",
"end": "2014-05-28"
}
}
> *
print COOKIES
10:19:50.973 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:50.974 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:50.974 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qTlTpoAz5ULPgdjU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14752/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14752/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:50.975 [print] {
"resourceType": "MedicationAdministration",
"id": "14752",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:55.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX01",
"display": "Mitobronitol"
}
]
},
"effectivePeriod": {
"start": "2014-12-01",
"end": "2014-05-28"
}
}
> *
print COOKIES
10:19:50.975 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:51.540 [print] {
"resourceType": "MedicationAdministration",
"id": "14752",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:55.680+02:00",
"source": "#qTlTpoAz5ULPgdjU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX01",
"display": "Mitobronitol"
}
]
},
"effectivePeriod": {
"start": "2014-12-01",
"end": "2014-05-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:52.246 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:52.846 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:56.952+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:56.952+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:52.846 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE38",
"display": "Cobimetinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-08",
"end": "2014-07-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:53.434 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:53.434 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X9T94kU0SS5PudLi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14753/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14753/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:53.434 [print] {
"resourceType": "MedicationAdministration",
"id": "14753",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:58.155+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE38",
"display": "Cobimetinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-08",
"end": "2014-07-18"
}
}
> *
print COOKIES
10:19:53.449 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:53.451 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:53.451 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X9T94kU0SS5PudLi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14753/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:19:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14753/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:19:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:53.451 [print] {
"resourceType": "MedicationAdministration",
"id": "14753",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:58.155+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE38",
"display": "Cobimetinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-08",
"end": "2014-07-18"
}
}
> *
print COOKIES
10:19:53.451 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:54.079 [print] {
"resourceType": "MedicationAdministration",
"id": "14753",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:19:58.155+02:00",
"source": "#X9T94kU0SS5PudLi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE38",
"display": "Cobimetinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-08",
"end": "2014-07-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:54.694 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:55.347 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:19:59.402+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:19:59.402+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:55.348 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AG01",
"display": "Etoglucide"
}
]
},
"effectivePeriod": {
"start": "2015-07-22",
"end": "2014-09-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:56.190 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:56.190 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uxN6tG4sq4FeX0AK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14754/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14754/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:56.190 [print] {
"resourceType": "MedicationAdministration",
"id": "14754",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:00.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AG01",
"display": "Etoglucide"
}
]
},
"effectivePeriod": {
"start": "2015-07-22",
"end": "2014-09-02"
}
}
> *
print COOKIES
10:19:56.190 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:56.192 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:56.192 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uxN6tG4sq4FeX0AK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14754/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14754/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:56.192 [print] {
"resourceType": "MedicationAdministration",
"id": "14754",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:00.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AG01",
"display": "Etoglucide"
}
]
},
"effectivePeriod": {
"start": "2015-07-22",
"end": "2014-09-02"
}
}
> *
print COOKIES
10:19:56.192 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:56.890 [print] {
"resourceType": "MedicationAdministration",
"id": "14754",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:00.682+02:00",
"source": "#uxN6tG4sq4FeX0AK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AG01",
"display": "Etoglucide"
}
]
},
"effectivePeriod": {
"start": "2015-07-22",
"end": "2014-09-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:19:57.778 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:19:58.380 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:02.492+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:02.492+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:19:58.380 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC59",
"display": "Trifluridina + tipiracil"
}
]
},
"effectivePeriod": {
"start": "2015-10-21",
"end": "2014-11-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:59.015 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:59.015 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KI0DPkYdE7izGKSU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14755/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14755/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:59.015 [print] {
"resourceType": "MedicationAdministration",
"id": "14755",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:03.716+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC59",
"display": "Trifluridina + tipiracil"
}
]
},
"effectivePeriod": {
"start": "2015-10-21",
"end": "2014-11-19"
}
}
> *
print COOKIES
10:19:59.016 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:19:59.017 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:19:59.017 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KI0DPkYdE7izGKSU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14755/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14755/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:19:59.017 [print] {
"resourceType": "MedicationAdministration",
"id": "14755",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:03.716+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC59",
"display": "Trifluridina + tipiracil"
}
]
},
"effectivePeriod": {
"start": "2015-10-21",
"end": "2014-11-19"
}
}
> *
print COOKIES
10:19:59.017 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:19:59.621 [print] {
"resourceType": "MedicationAdministration",
"id": "14755",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:03.716+02:00",
"source": "#KI0DPkYdE7izGKSU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC59",
"display": "Trifluridina + tipiracil"
}
]
},
"effectivePeriod": {
"start": "2015-10-21",
"end": "2014-11-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:00.229 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:01.068 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:04.944+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:04.944+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:01.069 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX02",
"display": "Degarelix"
}
]
},
"effectivePeriod": {
"start": "2015-10-22",
"end": "2014-11-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:01.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:01.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JcDY5zHKOoZTvT8Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14756/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14756/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:01.654 [print] {
"resourceType": "MedicationAdministration",
"id": "14756",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:06.360+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX02",
"display": "Degarelix"
}
]
},
"effectivePeriod": {
"start": "2015-10-22",
"end": "2014-11-27"
}
}
> *
print COOKIES
10:20:01.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:01.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:01.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JcDY5zHKOoZTvT8Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14756/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14756/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:01.654 [print] {
"resourceType": "MedicationAdministration",
"id": "14756",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:06.360+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX02",
"display": "Degarelix"
}
]
},
"effectivePeriod": {
"start": "2015-10-22",
"end": "2014-11-27"
}
}
> *
print COOKIES
10:20:01.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
http call failed after 592 milliseconds for url: https://psp-sp-fhir.prep.sanit.cineca.it/fhir/MedicationAdministration/14756 karate/src/features/api/xah.feature:28
Then
status 200
And
print response
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:02.261 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB12",
"display": "Albinterferon alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-10-23",
"end": "2014-12-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:02.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:02.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ho1h9o8AvMogW3g9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14757/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14757/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:02.892 [print] {
"resourceType": "MedicationAdministration",
"id": "14757",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:07.602+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB12",
"display": "Albinterferon alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-10-23",
"end": "2014-12-03"
}
}
> *
print COOKIES
10:20:02.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:02.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:02.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ho1h9o8AvMogW3g9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14757/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14757/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:02.892 [print] {
"resourceType": "MedicationAdministration",
"id": "14757",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:07.602+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB12",
"display": "Albinterferon alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-10-23",
"end": "2014-12-03"
}
}
> *
print COOKIES
10:20:02.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:03.540 [print] {
"resourceType": "MedicationAdministration",
"id": "14757",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:07.602+02:00",
"source": "#ho1h9o8AvMogW3g9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB12",
"display": "Albinterferon alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-10-23",
"end": "2014-12-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:04.144 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:04.761 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:08.855+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:08.855+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:04.761 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE04",
"display": "Sunitinib "
}
]
},
"effectivePeriod": {
"start": "2015-11-17",
"end": "2015-01-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:05.374 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:05.374 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kCJyzptUzbU9OgIo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14758/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14758/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:05.374 [print] {
"resourceType": "MedicationAdministration",
"id": "14758",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:10.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE04",
"display": "Sunitinib "
}
]
},
"effectivePeriod": {
"start": "2015-11-17",
"end": "2015-01-08"
}
}
> *
print COOKIES
10:20:05.374 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:05.377 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:05.377 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kCJyzptUzbU9OgIo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14758/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14758/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:05.377 [print] {
"resourceType": "MedicationAdministration",
"id": "14758",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:10.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE04",
"display": "Sunitinib "
}
]
},
"effectivePeriod": {
"start": "2015-11-17",
"end": "2015-01-08"
}
}
> *
print COOKIES
10:20:05.377 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:05.946 [print] {
"resourceType": "MedicationAdministration",
"id": "14758",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:10.075+02:00",
"source": "#kCJyzptUzbU9OgIo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE04",
"display": "Sunitinib "
}
]
},
"effectivePeriod": {
"start": "2015-11-17",
"end": "2015-01-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:06.579 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:07.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:11.293+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:11.293+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:07.259 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA04",
"display": "Pemetrexed "
}
]
},
"effectivePeriod": {
"start": "2016-01-18",
"end": "2015-03-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:07.905 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:07.905 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jj7PCrBiYpl9UQAg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14759/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14759/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:07.905 [print] {
"resourceType": "MedicationAdministration",
"id": "14759",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:12.608+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA04",
"display": "Pemetrexed "
}
]
},
"effectivePeriod": {
"start": "2016-01-18",
"end": "2015-03-19"
}
}
> *
print COOKIES
10:20:07.905 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:07.907 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:07.907 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jj7PCrBiYpl9UQAg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14759/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14759/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:07.907 [print] {
"resourceType": "MedicationAdministration",
"id": "14759",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:12.608+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA04",
"display": "Pemetrexed "
}
]
},
"effectivePeriod": {
"start": "2016-01-18",
"end": "2015-03-19"
}
}
> *
print COOKIES
10:20:07.907 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:08.499 [print] {
"resourceType": "MedicationAdministration",
"id": "14759",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:12.608+02:00",
"source": "#jj7PCrBiYpl9UQAg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA04",
"display": "Pemetrexed "
}
]
},
"effectivePeriod": {
"start": "2016-01-18",
"end": "2015-03-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:09.158 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:09.788 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:13.864+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:13.864+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:09.789 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timostimulina"
}
]
},
"effectivePeriod": {
"start": "2016-01-26",
"end": "2015-08-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:10.360 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:10.360 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nEgqTHqrW3OIBfll"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14760/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14760/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:10.360 [print] {
"resourceType": "MedicationAdministration",
"id": "14760",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:15.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timostimulina"
}
]
},
"effectivePeriod": {
"start": "2016-01-26",
"end": "2015-08-07"
}
}
> *
print COOKIES
10:20:10.360 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:10.362 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:10.362 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nEgqTHqrW3OIBfll"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14760/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14760/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:10.362 [print] {
"resourceType": "MedicationAdministration",
"id": "14760",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:15.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timostimulina"
}
]
},
"effectivePeriod": {
"start": "2016-01-26",
"end": "2015-08-07"
}
}
> *
print COOKIES
10:20:10.362 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:10.978 [print] {
"resourceType": "MedicationAdministration",
"id": "14760",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:15.065+02:00",
"source": "#nEgqTHqrW3OIBfll",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timostimulina"
}
]
},
"effectivePeriod": {
"start": "2016-01-26",
"end": "2015-08-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:11.635 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:12.213 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:16.337+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:16.337+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:12.228 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX03",
"display": "Metotrexato "
}
]
},
"effectivePeriod": {
"start": "2016-02-04",
"end": "2015-08-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:12.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:12.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ReiqoFVYKtwkA4zT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14761/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14761/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:12.856 [print] {
"resourceType": "MedicationAdministration",
"id": "14761",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:17.564+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX03",
"display": "Metotrexato "
}
]
},
"effectivePeriod": {
"start": "2016-02-04",
"end": "2015-08-13"
}
}
> *
print COOKIES
10:20:12.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:12.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:12.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ReiqoFVYKtwkA4zT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14761/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14761/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:12.856 [print] {
"resourceType": "MedicationAdministration",
"id": "14761",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:17.564+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX03",
"display": "Metotrexato "
}
]
},
"effectivePeriod": {
"start": "2016-02-04",
"end": "2015-08-13"
}
}
> *
print COOKIES
10:20:12.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:13.694 [print] {
"resourceType": "MedicationAdministration",
"id": "14761",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:17.564+02:00",
"source": "#ReiqoFVYKtwkA4zT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX03",
"display": "Metotrexato "
}
]
},
"effectivePeriod": {
"start": "2016-02-04",
"end": "2015-08-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:14.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:14.963 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:19.017+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:19.017+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:14.964 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA09",
"display": "Bendamustina "
}
]
},
"effectivePeriod": {
"start": "2016-07-11",
"end": "2016-02-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:15.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:15.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nnupYVismD6xVJTd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14762/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14762/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:15.547 [print] {
"resourceType": "MedicationAdministration",
"id": "14762",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:20.267+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA09",
"display": "Bendamustina "
}
]
},
"effectivePeriod": {
"start": "2016-07-11",
"end": "2016-02-04"
}
}
> *
print COOKIES
10:20:15.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:15.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:15.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nnupYVismD6xVJTd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14762/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14762/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:15.547 [print] {
"resourceType": "MedicationAdministration",
"id": "14762",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:20.267+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA09",
"display": "Bendamustina "
}
]
},
"effectivePeriod": {
"start": "2016-07-11",
"end": "2016-02-04"
}
}
> *
print COOKIES
10:20:15.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:16.130 [print] {
"resourceType": "MedicationAdministration",
"id": "14762",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:20.267+02:00",
"source": "#nnupYVismD6xVJTd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA09",
"display": "Bendamustina "
}
]
},
"effectivePeriod": {
"start": "2016-07-11",
"end": "2016-02-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:16.767 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:17.347 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:21.475+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:21.475+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:17.347 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA01",
"display": "Vinblastina "
}
]
},
"effectivePeriod": {
"start": "2016-07-15",
"end": "2016-03-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:17.951 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:17.951 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qp7ycMGu6uhUgNw5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14763/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14763/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:17.951 [print] {
"resourceType": "MedicationAdministration",
"id": "14763",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:22.659+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA01",
"display": "Vinblastina "
}
]
},
"effectivePeriod": {
"start": "2016-07-15",
"end": "2016-03-22"
}
}
> *
print COOKIES
10:20:17.951 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:17.951 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:17.951 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qp7ycMGu6uhUgNw5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14763/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14763/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:17.951 [print] {
"resourceType": "MedicationAdministration",
"id": "14763",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:22.659+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA01",
"display": "Vinblastina "
}
]
},
"effectivePeriod": {
"start": "2016-07-15",
"end": "2016-03-22"
}
}
> *
print COOKIES
10:20:17.951 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:18.546 [print] {
"resourceType": "MedicationAdministration",
"id": "14763",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:22.659+02:00",
"source": "#Qp7ycMGu6uhUgNw5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA01",
"display": "Vinblastina "
}
]
},
"effectivePeriod": {
"start": "2016-07-15",
"end": "2016-03-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:19.389 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:19.994 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:24.099+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:24.099+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:19.995 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB03",
"display": "Bicalutamide"
}
]
},
"effectivePeriod": {
"start": "2016-10-21",
"end": "2016-05-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:20.613 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:20.613 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6dB6upiRttcHxwHa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14764/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14764/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:20.613 [print] {
"resourceType": "MedicationAdministration",
"id": "14764",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:25.332+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB03",
"display": "Bicalutamide"
}
]
},
"effectivePeriod": {
"start": "2016-10-21",
"end": "2016-05-25"
}
}
> *
print COOKIES
10:20:20.613 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:20.613 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:20.613 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6dB6upiRttcHxwHa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14764/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14764/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:20.613 [print] {
"resourceType": "MedicationAdministration",
"id": "14764",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:25.332+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB03",
"display": "Bicalutamide"
}
]
},
"effectivePeriod": {
"start": "2016-10-21",
"end": "2016-05-25"
}
}
> *
print COOKIES
10:20:20.613 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:21.245 [print] {
"resourceType": "MedicationAdministration",
"id": "14764",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:25.332+02:00",
"source": "#6dB6upiRttcHxwHa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB03",
"display": "Bicalutamide"
}
]
},
"effectivePeriod": {
"start": "2016-10-21",
"end": "2016-05-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:21.881 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:22.496 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:26.589+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:26.589+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:22.496 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timalfasina"
}
]
},
"effectivePeriod": {
"start": "2016-11-24",
"end": "2016-10-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:23.126 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:23.126 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pETS3CuwvYYclW24"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14765/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14765/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:23.126 [print] {
"resourceType": "MedicationAdministration",
"id": "14765",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:27.831+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timalfasina"
}
]
},
"effectivePeriod": {
"start": "2016-11-24",
"end": "2016-10-07"
}
}
> *
print COOKIES
10:20:23.126 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:23.128 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:23.128 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pETS3CuwvYYclW24"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14765/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14765/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:23.128 [print] {
"resourceType": "MedicationAdministration",
"id": "14765",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:27.831+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timalfasina"
}
]
},
"effectivePeriod": {
"start": "2016-11-24",
"end": "2016-10-07"
}
}
> *
print COOKIES
10:20:23.128 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:23.690 [print] {
"resourceType": "MedicationAdministration",
"id": "14765",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:27.831+02:00",
"source": "#pETS3CuwvYYclW24",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timalfasina"
}
]
},
"effectivePeriod": {
"start": "2016-11-24",
"end": "2016-10-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:24.292 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:24.901 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:29.000+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:29.000+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:24.902 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB02",
"display": "Mercaptopurina"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2016-12-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:25.516 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:25.516 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QHVcPkrjVCcHRMmJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14766/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14766/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:25.516 [print] {
"resourceType": "MedicationAdministration",
"id": "14766",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:30.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB02",
"display": "Mercaptopurina"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2016-12-30"
}
}
> *
print COOKIES
10:20:25.516 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:25.518 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:25.518 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QHVcPkrjVCcHRMmJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14766/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14766/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:25.518 [print] {
"resourceType": "MedicationAdministration",
"id": "14766",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:30.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB02",
"display": "Mercaptopurina"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2016-12-30"
}
}
> *
print COOKIES
10:20:25.518 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:26.131 [print] {
"resourceType": "MedicationAdministration",
"id": "14766",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:30.218+02:00",
"source": "#QHVcPkrjVCcHRMmJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB02",
"display": "Mercaptopurina"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2016-12-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:26.782 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:27.721 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:31.486+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:31.486+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:27.722 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD04",
"display": "Streptozocina"
}
]
},
"effectivePeriod": {
"start": "2017-05-17",
"end": "2017-03-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:28.315 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:28.315 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SzSiI0BkZi1Ua1nX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14767/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14767/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:28.315 [print] {
"resourceType": "MedicationAdministration",
"id": "14767",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:33.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD04",
"display": "Streptozocina"
}
]
},
"effectivePeriod": {
"start": "2017-05-17",
"end": "2017-03-16"
}
}
> *
print COOKIES
10:20:28.315 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:28.316 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:28.316 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SzSiI0BkZi1Ua1nX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14767/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14767/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:28.316 [print] {
"resourceType": "MedicationAdministration",
"id": "14767",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:33.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD04",
"display": "Streptozocina"
}
]
},
"effectivePeriod": {
"start": "2017-05-17",
"end": "2017-03-16"
}
}
> *
print COOKIES
10:20:28.316 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:28.980 [print] {
"resourceType": "MedicationAdministration",
"id": "14767",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:33.010+02:00",
"source": "#SzSiI0BkZi1Ua1nX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD04",
"display": "Streptozocina"
}
]
},
"effectivePeriod": {
"start": "2017-05-17",
"end": "2017-03-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:29.763 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:30.378 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:34.466+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:34.466+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:30.379 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG02",
"display": "Formestano"
}
]
},
"effectivePeriod": {
"start": "2017-06-15",
"end": "2017-03-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:31.028 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:31.028 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DvP0lo51WTHyMqna"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14768/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14768/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:31.028 [print] {
"resourceType": "MedicationAdministration",
"id": "14768",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:35.744+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG02",
"display": "Formestano"
}
]
},
"effectivePeriod": {
"start": "2017-06-15",
"end": "2017-03-28"
}
}
> *
print COOKIES
10:20:31.028 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:31.028 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:31.028 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DvP0lo51WTHyMqna"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14768/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14768/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:31.028 [print] {
"resourceType": "MedicationAdministration",
"id": "14768",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:35.744+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG02",
"display": "Formestano"
}
]
},
"effectivePeriod": {
"start": "2017-06-15",
"end": "2017-03-28"
}
}
> *
print COOKIES
10:20:31.028 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:31.622 [print] {
"resourceType": "MedicationAdministration",
"id": "14768",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:35.744+02:00",
"source": "#DvP0lo51WTHyMqna",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG02",
"display": "Formestano"
}
]
},
"effectivePeriod": {
"start": "2017-06-15",
"end": "2017-03-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:32.294 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:32.959 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:36.991+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:36.991+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:32.959 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG04",
"display": "Letrozolo"
}
]
},
"effectivePeriod": {
"start": "2017-11-07",
"end": "2017-07-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:33.596 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:33.596 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EfxXF3re0DnSVLCl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14769/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14769/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:33.596 [print] {
"resourceType": "MedicationAdministration",
"id": "14769",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:38.298+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG04",
"display": "Letrozolo"
}
]
},
"effectivePeriod": {
"start": "2017-11-07",
"end": "2017-07-07"
}
}
> *
print COOKIES
10:20:33.596 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:33.599 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:33.599 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EfxXF3re0DnSVLCl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14769/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14769/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:33.599 [print] {
"resourceType": "MedicationAdministration",
"id": "14769",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:38.298+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG04",
"display": "Letrozolo"
}
]
},
"effectivePeriod": {
"start": "2017-11-07",
"end": "2017-07-07"
}
}
> *
print COOKIES
10:20:33.599 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:34.192 [print] {
"resourceType": "MedicationAdministration",
"id": "14769",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:38.298+02:00",
"source": "#EfxXF3re0DnSVLCl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG04",
"display": "Letrozolo"
}
]
},
"effectivePeriod": {
"start": "2017-11-07",
"end": "2017-07-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:34.826 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:35.399 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:39.541+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:39.541+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:35.399 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE05",
"display": "Sorafenib"
}
]
},
"effectivePeriod": {
"start": "2012-09-19",
"end": "2012-12-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:35.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:35.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gkhmjRjHgbrx5bD2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14770/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14770/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:35.992 [print] {
"resourceType": "MedicationAdministration",
"id": "14770",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:40.710+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE05",
"display": "Sorafenib"
}
]
},
"effectivePeriod": {
"start": "2012-09-19",
"end": "2012-12-04"
}
}
> *
print COOKIES
10:20:35.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:35.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:35.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gkhmjRjHgbrx5bD2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14770/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14770/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:35.992 [print] {
"resourceType": "MedicationAdministration",
"id": "14770",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:40.710+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE05",
"display": "Sorafenib"
}
]
},
"effectivePeriod": {
"start": "2012-09-19",
"end": "2012-12-04"
}
}
> *
print COOKIES
10:20:35.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:36.613 [print] {
"resourceType": "MedicationAdministration",
"id": "14770",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:40.710+02:00",
"source": "#gkhmjRjHgbrx5bD2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE05",
"display": "Sorafenib"
}
]
},
"effectivePeriod": {
"start": "2012-09-19",
"end": "2012-12-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:37.296 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:37.910 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:41.966+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:41.966+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:37.910 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX46",
"display": "Olaparib"
}
]
},
"effectivePeriod": {
"start": "2012-12-19",
"end": "2013-12-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:38.564 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:38.564 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TCGq0r8lhltOgXwG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14771/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14771/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:38.564 [print] {
"resourceType": "MedicationAdministration",
"id": "14771",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:43.264+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX46",
"display": "Olaparib"
}
]
},
"effectivePeriod": {
"start": "2012-12-19",
"end": "2013-12-04"
}
}
> *
print COOKIES
10:20:38.564 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:38.564 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:38.564 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TCGq0r8lhltOgXwG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14771/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14771/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:38.564 [print] {
"resourceType": "MedicationAdministration",
"id": "14771",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:43.264+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX46",
"display": "Olaparib"
}
]
},
"effectivePeriod": {
"start": "2012-12-19",
"end": "2013-12-04"
}
}
> *
print COOKIES
10:20:38.579 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:39.229 [print] {
"resourceType": "MedicationAdministration",
"id": "14771",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:43.264+02:00",
"source": "#TCGq0r8lhltOgXwG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX46",
"display": "Olaparib"
}
]
},
"effectivePeriod": {
"start": "2012-12-19",
"end": "2013-12-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:39.815 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:40.417 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:44.528+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:44.528+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:40.417 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB03",
"display": "Epirubicina "
}
]
},
"effectivePeriod": {
"start": "2013-02-01",
"end": "2014-06-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:41.059 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:41.059 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qZY81j1z0X1nYtiS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14772/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14772/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:41.059 [print] {
"resourceType": "MedicationAdministration",
"id": "14772",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:45.771+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB03",
"display": "Epirubicina "
}
]
},
"effectivePeriod": {
"start": "2013-02-01",
"end": "2014-06-12"
}
}
> *
print COOKIES
10:20:41.059 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:41.059 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:41.059 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qZY81j1z0X1nYtiS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14772/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14772/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:41.059 [print] {
"resourceType": "MedicationAdministration",
"id": "14772",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:45.771+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB03",
"display": "Epirubicina "
}
]
},
"effectivePeriod": {
"start": "2013-02-01",
"end": "2014-06-12"
}
}
> *
print COOKIES
10:20:41.059 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:41.719 [print] {
"resourceType": "MedicationAdministration",
"id": "14772",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:45.771+02:00",
"source": "#qZY81j1z0X1nYtiS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB03",
"display": "Epirubicina "
}
]
},
"effectivePeriod": {
"start": "2013-02-01",
"end": "2014-06-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:42.321 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:42.954 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:47.036+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:47.036+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:42.954 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE03",
"display": "Goserelina"
}
]
},
"effectivePeriod": {
"start": "2013-08-06",
"end": "2014-10-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:43.565 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:43.565 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a33iBmzdcaSQmaV6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14773/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14773/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:43.565 [print] {
"resourceType": "MedicationAdministration",
"id": "14773",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:48.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE03",
"display": "Goserelina"
}
]
},
"effectivePeriod": {
"start": "2013-08-06",
"end": "2014-10-17"
}
}
> *
print COOKIES
10:20:43.565 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:43.566 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:43.566 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a33iBmzdcaSQmaV6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14773/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14773/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:43.566 [print] {
"resourceType": "MedicationAdministration",
"id": "14773",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:48.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE03",
"display": "Goserelina"
}
]
},
"effectivePeriod": {
"start": "2013-08-06",
"end": "2014-10-17"
}
}
> *
print COOKIES
10:20:43.567 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:44.141 [print] {
"resourceType": "MedicationAdministration",
"id": "14773",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:48.274+02:00",
"source": "#a33iBmzdcaSQmaV6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE03",
"display": "Goserelina"
}
]
},
"effectivePeriod": {
"start": "2013-08-06",
"end": "2014-10-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:44.772 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:45.346 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:49.471+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:49.471+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:45.362 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX52",
"display": "Venetoclax"
}
]
},
"effectivePeriod": {
"start": "2013-12-05",
"end": "2015-01-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:45.980 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:45.980 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cb3zVVCuxnEO6WaR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14774/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14774/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:45.980 [print] {
"resourceType": "MedicationAdministration",
"id": "14774",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:50.698+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX52",
"display": "Venetoclax"
}
]
},
"effectivePeriod": {
"start": "2013-12-05",
"end": "2015-01-27"
}
}
> *
print COOKIES
10:20:45.980 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:45.980 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:45.980 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cb3zVVCuxnEO6WaR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14774/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14774/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:45.980 [print] {
"resourceType": "MedicationAdministration",
"id": "14774",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:50.698+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX52",
"display": "Venetoclax"
}
]
},
"effectivePeriod": {
"start": "2013-12-05",
"end": "2015-01-27"
}
}
> *
print COOKIES
10:20:45.980 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:46.561 [print] {
"resourceType": "MedicationAdministration",
"id": "14774",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:50.698+02:00",
"source": "#cb3zVVCuxnEO6WaR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX52",
"display": "Venetoclax"
}
]
},
"effectivePeriod": {
"start": "2013-12-05",
"end": "2015-01-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:47.177 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:47.825 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:51.888+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:51.888+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:47.825 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB60",
"display": "Peginterferon alfa-2b, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-02-17",
"end": "2015-03-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:48.456 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:48.456 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pmbKngqotvMbHoWa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14775/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14775/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:48.456 [print] {
"resourceType": "MedicationAdministration",
"id": "14775",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:53.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB60",
"display": "Peginterferon alfa-2b, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-02-17",
"end": "2015-03-23"
}
}
> *
print COOKIES
10:20:48.456 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:48.458 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:48.458 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pmbKngqotvMbHoWa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14775/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14775/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:48.458 [print] {
"resourceType": "MedicationAdministration",
"id": "14775",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:53.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB60",
"display": "Peginterferon alfa-2b, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-02-17",
"end": "2015-03-23"
}
}
> *
print COOKIES
10:20:48.458 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:49.024 [print] {
"resourceType": "MedicationAdministration",
"id": "14775",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:53.151+02:00",
"source": "#pmbKngqotvMbHoWa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB60",
"display": "Peginterferon alfa-2b, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-02-17",
"end": "2015-03-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:49.629 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:50.267 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:54.347+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:54.347+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:50.267 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX27",
"display": "Arsenico triossido"
}
]
},
"effectivePeriod": {
"start": "2014-07-04",
"end": "2015-04-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:50.885 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"647"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:50.885 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AbJDYODAmrN1MWZ5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14776/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14776/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:50.885 [print] {
"resourceType": "MedicationAdministration",
"id": "14776",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:55.591+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX27",
"display": "Arsenico triossido"
}
]
},
"effectivePeriod": {
"start": "2014-07-04",
"end": "2015-04-09"
}
}
> *
print COOKIES
10:20:50.885 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:50.887 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"647"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:50.887 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AbJDYODAmrN1MWZ5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14776/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14776/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:50.887 [print] {
"resourceType": "MedicationAdministration",
"id": "14776",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:55.591+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX27",
"display": "Arsenico triossido"
}
]
},
"effectivePeriod": {
"start": "2014-07-04",
"end": "2015-04-09"
}
}
> *
print COOKIES
10:20:50.887 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:51.446 [print] {
"resourceType": "MedicationAdministration",
"id": "14776",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:55.591+02:00",
"source": "#AbJDYODAmrN1MWZ5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX27",
"display": "Arsenico triossido"
}
]
},
"effectivePeriod": {
"start": "2014-07-04",
"end": "2015-04-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:52.046 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:52.707 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:20:56.752+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:20:56.752+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:52.709 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB02",
"display": "Teniposide"
}
]
},
"effectivePeriod": {
"start": "2014-08-25",
"end": "2015-05-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:53.343 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:53.343 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hNuKjDTMO9WuBm1O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14777/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14777/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:53.343 [print] {
"resourceType": "MedicationAdministration",
"id": "14777",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:58.053+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB02",
"display": "Teniposide"
}
]
},
"effectivePeriod": {
"start": "2014-08-25",
"end": "2015-05-11"
}
}
> *
print COOKIES
10:20:53.359 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:53.359 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:53.359 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hNuKjDTMO9WuBm1O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14777/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:20:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14777/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:20:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:53.359 [print] {
"resourceType": "MedicationAdministration",
"id": "14777",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:58.053+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB02",
"display": "Teniposide"
}
]
},
"effectivePeriod": {
"start": "2014-08-25",
"end": "2015-05-11"
}
}
> *
print COOKIES
10:20:53.359 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:54.971 [print] {
"resourceType": "MedicationAdministration",
"id": "14777",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:20:58.053+02:00",
"source": "#hNuKjDTMO9WuBm1O",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB02",
"display": "Teniposide"
}
]
},
"effectivePeriod": {
"start": "2014-08-25",
"end": "2015-05-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:55.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:56.143 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:00.282+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:00.282+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:56.143 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA32",
"display": "Apremilast"
}
]
},
"effectivePeriod": {
"start": "2014-09-22",
"end": "2015-07-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:56.746 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:56.746 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zHCGFzzSfDrlnsTL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14778/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14778/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:56.746 [print] {
"resourceType": "MedicationAdministration",
"id": "14778",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:01.461+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA32",
"display": "Apremilast"
}
]
},
"effectivePeriod": {
"start": "2014-09-22",
"end": "2015-07-24"
}
}
> *
print COOKIES
10:20:56.746 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:56.746 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:56.746 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zHCGFzzSfDrlnsTL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14778/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14778/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:56.746 [print] {
"resourceType": "MedicationAdministration",
"id": "14778",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:01.461+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA32",
"display": "Apremilast"
}
]
},
"effectivePeriod": {
"start": "2014-09-22",
"end": "2015-07-24"
}
}
> *
print COOKIES
10:20:56.746 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:57.338 [print] {
"resourceType": "MedicationAdministration",
"id": "14778",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:01.461+02:00",
"source": "#zHCGFzzSfDrlnsTL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA32",
"display": "Apremilast"
}
]
},
"effectivePeriod": {
"start": "2014-09-22",
"end": "2015-07-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:20:57.937 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:20:58.563 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:02.645+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:02.645+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:20:58.563 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX02",
"display": "Roquinimex"
}
]
},
"effectivePeriod": {
"start": "2014-10-29",
"end": "2015-08-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:59.179 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:59.179 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pYFsQaeEZMSkqLFb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14779/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14779/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:59.179 [print] {
"resourceType": "MedicationAdministration",
"id": "14779",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:03.887+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX02",
"display": "Roquinimex"
}
]
},
"effectivePeriod": {
"start": "2014-10-29",
"end": "2015-08-26"
}
}
> *
print COOKIES
10:20:59.179 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:20:59.180 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:20:59.180 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pYFsQaeEZMSkqLFb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14779/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14779/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:20:59.180 [print] {
"resourceType": "MedicationAdministration",
"id": "14779",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:03.887+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX02",
"display": "Roquinimex"
}
]
},
"effectivePeriod": {
"start": "2014-10-29",
"end": "2015-08-26"
}
}
> *
print COOKIES
10:20:59.180 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:20:59.746 [print] {
"resourceType": "MedicationAdministration",
"id": "14779",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:03.887+02:00",
"source": "#pYFsQaeEZMSkqLFb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX02",
"display": "Roquinimex"
}
]
},
"effectivePeriod": {
"start": "2014-10-29",
"end": "2015-08-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:00.361 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:01.163 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:05.072+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:05.072+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:01.179 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX36",
"display": "Oblimersen"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2015-09-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:01.794 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:01.794 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LSc02GSrRO0H2oPc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14780/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14780/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:01.794 [print] {
"resourceType": "MedicationAdministration",
"id": "14780",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:06.506+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX36",
"display": "Oblimersen"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2015-09-15"
}
}
> *
print COOKIES
10:21:01.794 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:01.794 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:01.794 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LSc02GSrRO0H2oPc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14780/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14780/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:01.794 [print] {
"resourceType": "MedicationAdministration",
"id": "14780",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:06.506+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX36",
"display": "Oblimersen"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2015-09-15"
}
}
> *
print COOKIES
10:21:01.794 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:02.392 [print] {
"resourceType": "MedicationAdministration",
"id": "14780",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:06.506+02:00",
"source": "#LSc02GSrRO0H2oPc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX36",
"display": "Oblimersen"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2015-09-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:03.020 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:03.784 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:07.730+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:07.730+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:03.784 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB08",
"display": "Interferone beta-1b"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-12-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:04.395 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:04.395 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7XPgrgi9amYzBoGP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14781/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14781/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:04.395 [print] {
"resourceType": "MedicationAdministration",
"id": "14781",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:09.103+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB08",
"display": "Interferone beta-1b"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-12-02"
}
}
> *
print COOKIES
10:21:04.395 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:04.396 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:04.396 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7XPgrgi9amYzBoGP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14781/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14781/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:04.396 [print] {
"resourceType": "MedicationAdministration",
"id": "14781",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:09.103+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB08",
"display": "Interferone beta-1b"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-12-02"
}
}
> *
print COOKIES
10:21:04.396 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:04.996 [print] {
"resourceType": "MedicationAdministration",
"id": "14781",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:09.103+02:00",
"source": "#7XPgrgi9amYzBoGP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB08",
"display": "Interferone beta-1b"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-12-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:05.577 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:06.178 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:10.292+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:10.292+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:06.179 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD01",
"display": "Carmustina"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-12-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:06.758 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:06.758 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zLxpVxK4tPobJBjB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14782/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14782/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:06.758 [print] {
"resourceType": "MedicationAdministration",
"id": "14782",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:11.465+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD01",
"display": "Carmustina"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-12-23"
}
}
> *
print COOKIES
10:21:06.758 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:06.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:06.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zLxpVxK4tPobJBjB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14782/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14782/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:06.760 [print] {
"resourceType": "MedicationAdministration",
"id": "14782",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:11.465+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD01",
"display": "Carmustina"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-12-23"
}
}
> *
print COOKIES
10:21:06.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:07.320 [print] {
"resourceType": "MedicationAdministration",
"id": "14782",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:11.465+02:00",
"source": "#zLxpVxK4tPobJBjB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD01",
"display": "Carmustina"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-12-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:07.909 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:08.534 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:12.620+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:12.620+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:08.536 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA04",
"display": "Satraplatino"
}
]
},
"effectivePeriod": {
"start": "2016-01-08",
"end": "2016-05-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:09.116 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:09.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MDDgt9UAlOMnsQsG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14783/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14783/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:09.117 [print] {
"resourceType": "MedicationAdministration",
"id": "14783",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:13.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA04",
"display": "Satraplatino"
}
]
},
"effectivePeriod": {
"start": "2016-01-08",
"end": "2016-05-30"
}
}
> *
print COOKIES
10:21:09.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:09.118 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:09.118 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MDDgt9UAlOMnsQsG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14783/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14783/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:09.118 [print] {
"resourceType": "MedicationAdministration",
"id": "14783",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:13.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA04",
"display": "Satraplatino"
}
]
},
"effectivePeriod": {
"start": "2016-01-08",
"end": "2016-05-30"
}
}
> *
print COOKIES
10:21:09.118 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:10.964 [print] {
"resourceType": "MedicationAdministration",
"id": "14783",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:13.821+02:00",
"source": "#MDDgt9UAlOMnsQsG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA04",
"display": "Satraplatino"
}
]
},
"effectivePeriod": {
"start": "2016-01-08",
"end": "2016-05-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:11.562 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:12.179 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:16.279+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:16.279+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:12.179 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX10",
"display": "Masoprocol"
}
]
},
"effectivePeriod": {
"start": "2016-02-08",
"end": "2016-07-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:12.795 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:12.795 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XLvSB9LYKQNn3ngr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14784/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14784/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:12.795 [print] {
"resourceType": "MedicationAdministration",
"id": "14784",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:17.506+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX10",
"display": "Masoprocol"
}
]
},
"effectivePeriod": {
"start": "2016-02-08",
"end": "2016-07-21"
}
}
> *
print COOKIES
10:21:12.795 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:12.795 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:12.795 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XLvSB9LYKQNn3ngr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14784/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14784/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:12.795 [print] {
"resourceType": "MedicationAdministration",
"id": "14784",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:17.506+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX10",
"display": "Masoprocol"
}
]
},
"effectivePeriod": {
"start": "2016-02-08",
"end": "2016-07-21"
}
}
> *
print COOKIES
10:21:12.795 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:13.396 [print] {
"resourceType": "MedicationAdministration",
"id": "14784",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:17.506+02:00",
"source": "#XLvSB9LYKQNn3ngr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX10",
"display": "Masoprocol"
}
]
},
"effectivePeriod": {
"start": "2016-02-08",
"end": "2016-07-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:13.959 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:14.544 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:18.682+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:18.682+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:14.545 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE28",
"display": "Ceritinib"
}
]
},
"effectivePeriod": {
"start": "2016-04-07",
"end": "2016-12-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:15.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:15.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tOTczIr35Dudhsiz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14785/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14785/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:15.111 [print] {
"resourceType": "MedicationAdministration",
"id": "14785",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:19.819+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE28",
"display": "Ceritinib"
}
]
},
"effectivePeriod": {
"start": "2016-04-07",
"end": "2016-12-01"
}
}
> *
print COOKIES
10:21:15.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:15.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:15.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tOTczIr35Dudhsiz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14785/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14785/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:15.113 [print] {
"resourceType": "MedicationAdministration",
"id": "14785",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:19.819+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE28",
"display": "Ceritinib"
}
]
},
"effectivePeriod": {
"start": "2016-04-07",
"end": "2016-12-01"
}
}
> *
print COOKIES
10:21:15.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:15.712 [print] {
"resourceType": "MedicationAdministration",
"id": "14785",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:19.819+02:00",
"source": "#tOTczIr35Dudhsiz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE28",
"display": "Ceritinib"
}
]
},
"effectivePeriod": {
"start": "2016-04-07",
"end": "2016-12-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:16.289 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:16.859 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:21.001+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:21.001+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:16.860 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG01",
"display": "Aminoglutetimide"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-12-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:17.463 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:17.463 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L44p0POJO7fKYZmB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14786/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14786/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:17.463 [print] {
"resourceType": "MedicationAdministration",
"id": "14786",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:22.181+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG01",
"display": "Aminoglutetimide"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-12-29"
}
}
> *
print COOKIES
10:21:17.463 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:17.478 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:17.478 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L44p0POJO7fKYZmB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14786/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14786/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:17.478 [print] {
"resourceType": "MedicationAdministration",
"id": "14786",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:22.181+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG01",
"display": "Aminoglutetimide"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-12-29"
}
}
> *
print COOKIES
10:21:17.478 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:18.057 [print] {
"resourceType": "MedicationAdministration",
"id": "14786",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:22.181+02:00",
"source": "#L44p0POJO7fKYZmB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG01",
"display": "Aminoglutetimide"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-12-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:18.686 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:19.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:23.389+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:23.389+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:19.252 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX24",
"display": "Pegaspargase"
}
]
},
"effectivePeriod": {
"start": "2016-06-27",
"end": "2017-03-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:19.863 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:19.863 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6QDPkKK0uBcNadF5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14787/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14787/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:19.863 [print] {
"resourceType": "MedicationAdministration",
"id": "14787",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:24.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX24",
"display": "Pegaspargase"
}
]
},
"effectivePeriod": {
"start": "2016-06-27",
"end": "2017-03-15"
}
}
> *
print COOKIES
10:21:19.863 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:19.863 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:19.863 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6QDPkKK0uBcNadF5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14787/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14787/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:19.863 [print] {
"resourceType": "MedicationAdministration",
"id": "14787",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:24.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX24",
"display": "Pegaspargase"
}
]
},
"effectivePeriod": {
"start": "2016-06-27",
"end": "2017-03-15"
}
}
> *
print COOKIES
10:21:19.863 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:20.449 [print] {
"resourceType": "MedicationAdministration",
"id": "14787",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:24.573+02:00",
"source": "#6QDPkKK0uBcNadF5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX24",
"display": "Pegaspargase"
}
]
},
"effectivePeriod": {
"start": "2016-06-27",
"end": "2017-03-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:21.055 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:21.683 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:25.771+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:25.771+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:21.684 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB90",
"display": "Interferone ricombinante omega di origine felina"
}
]
},
"effectivePeriod": {
"start": "2016-07-05",
"end": "2017-04-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:22.414 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"677"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:22.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TjFN43NsjfpIQoIm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14788/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14788/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:22.415 [print] {
"resourceType": "MedicationAdministration",
"id": "14788",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:27.124+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB90",
"display": "Interferone ricombinante omega di origine felina"
}
]
},
"effectivePeriod": {
"start": "2016-07-05",
"end": "2017-04-13"
}
}
> *
print COOKIES
10:21:22.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:22.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"677"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:22.416 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TjFN43NsjfpIQoIm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14788/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14788/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:22.416 [print] {
"resourceType": "MedicationAdministration",
"id": "14788",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:27.124+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB90",
"display": "Interferone ricombinante omega di origine felina"
}
]
},
"effectivePeriod": {
"start": "2016-07-05",
"end": "2017-04-13"
}
}
> *
print COOKIES
10:21:22.416 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:23.020 [print] {
"resourceType": "MedicationAdministration",
"id": "14788",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:27.124+02:00",
"source": "#TjFN43NsjfpIQoIm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB90",
"display": "Interferone ricombinante omega di origine felina"
}
]
},
"effectivePeriod": {
"start": "2016-07-05",
"end": "2017-04-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:23.627 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:24.261 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:28.325+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:28.325+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:24.261 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX45",
"display": "Carfilzomib"
}
]
},
"effectivePeriod": {
"start": "2016-09-23",
"end": "2017-05-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:24.906 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:24.906 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eOXjoJSSXR2kjhR9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14789/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14789/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:24.906 [print] {
"resourceType": "MedicationAdministration",
"id": "14789",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:29.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX45",
"display": "Carfilzomib"
}
]
},
"effectivePeriod": {
"start": "2016-09-23",
"end": "2017-05-08"
}
}
> *
print COOKIES
10:21:24.906 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:24.909 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:24.909 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eOXjoJSSXR2kjhR9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14789/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14789/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:24.909 [print] {
"resourceType": "MedicationAdministration",
"id": "14789",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:29.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX45",
"display": "Carfilzomib"
}
]
},
"effectivePeriod": {
"start": "2016-09-23",
"end": "2017-05-08"
}
}
> *
print COOKIES
10:21:24.909 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:25.518 [print] {
"resourceType": "MedicationAdministration",
"id": "14789",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:29.605+02:00",
"source": "#eOXjoJSSXR2kjhR9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX45",
"display": "Carfilzomib"
}
]
},
"effectivePeriod": {
"start": "2016-09-23",
"end": "2017-05-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:27.093 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:27.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:31.815+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:31.815+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:27.963 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX43",
"display": "Vismodegib"
}
]
},
"effectivePeriod": {
"start": "2017-06-27",
"end": "2017-05-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:28.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:28.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i3kdN80QqOdelfzl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14790/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14790/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:28.591 [print] {
"resourceType": "MedicationAdministration",
"id": "14790",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:33.308+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX43",
"display": "Vismodegib"
}
]
},
"effectivePeriod": {
"start": "2017-06-27",
"end": "2017-05-22"
}
}
> *
print COOKIES
10:21:28.591 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:28.607 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:28.607 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i3kdN80QqOdelfzl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14790/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14790/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:28.607 [print] {
"resourceType": "MedicationAdministration",
"id": "14790",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:33.308+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX43",
"display": "Vismodegib"
}
]
},
"effectivePeriod": {
"start": "2017-06-27",
"end": "2017-05-22"
}
}
> *
print COOKIES
10:21:28.607 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:29.183 [print] {
"resourceType": "MedicationAdministration",
"id": "14790",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:33.308+02:00",
"source": "#i3kdN80QqOdelfzl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX43",
"display": "Vismodegib"
}
]
},
"effectivePeriod": {
"start": "2017-06-27",
"end": "2017-05-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:29.760 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:30.340 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:34.467+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:34.467+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:30.340 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA22",
"display": "Abetimus"
}
]
},
"effectivePeriod": {
"start": "2017-07-04",
"end": "2017-06-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:30.980 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:30.980 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7SPgv2Wd1yXk6aZd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14791/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14791/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:30.980 [print] {
"resourceType": "MedicationAdministration",
"id": "14791",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:35.688+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA22",
"display": "Abetimus"
}
]
},
"effectivePeriod": {
"start": "2017-07-04",
"end": "2017-06-09"
}
}
> *
print COOKIES
10:21:30.980 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:30.980 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:30.980 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7SPgv2Wd1yXk6aZd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14791/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14791/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:30.980 [print] {
"resourceType": "MedicationAdministration",
"id": "14791",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:35.688+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA22",
"display": "Abetimus"
}
]
},
"effectivePeriod": {
"start": "2017-07-04",
"end": "2017-06-09"
}
}
> *
print COOKIES
10:21:30.980 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:31.797 [print] {
"resourceType": "MedicationAdministration",
"id": "14791",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:35.688+02:00",
"source": "#7SPgv2Wd1yXk6aZd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA22",
"display": "Abetimus"
}
]
},
"effectivePeriod": {
"start": "2017-07-04",
"end": "2017-06-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:32.458 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:33.043 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:37.153+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:37.153+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:33.044 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC17",
"display": "Nivolumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-28",
"end": "2017-06-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:34.624 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:34.624 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2oiQm1uajOVO28Zr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14792/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14792/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:34.624 [print] {
"resourceType": "MedicationAdministration",
"id": "14792",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:39.344+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC17",
"display": "Nivolumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-28",
"end": "2017-06-30"
}
}
> *
print COOKIES
10:21:34.624 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:34.640 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:34.640 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2oiQm1uajOVO28Zr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14792/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14792/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:34.640 [print] {
"resourceType": "MedicationAdministration",
"id": "14792",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:39.344+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC17",
"display": "Nivolumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-28",
"end": "2017-06-30"
}
}
> *
print COOKIES
10:21:34.640 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:36.261 [print] {
"resourceType": "MedicationAdministration",
"id": "14792",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:39.344+02:00",
"source": "#2oiQm1uajOVO28Zr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC17",
"display": "Nivolumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-28",
"end": "2017-06-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:36.850 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:37.472 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:41.561+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:41.561+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:37.473 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB03",
"display": "Afelimomab"
}
]
},
"effectivePeriod": {
"start": "2017-09-08",
"end": "2017-08-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:38.058 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:38.058 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mMHL2IVFA11KtQCl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14793/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14793/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:38.058 [print] {
"resourceType": "MedicationAdministration",
"id": "14793",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:42.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB03",
"display": "Afelimomab"
}
]
},
"effectivePeriod": {
"start": "2017-09-08",
"end": "2017-08-07"
}
}
> *
print COOKIES
10:21:38.058 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:38.058 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:38.058 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mMHL2IVFA11KtQCl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14793/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14793/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:38.058 [print] {
"resourceType": "MedicationAdministration",
"id": "14793",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:42.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB03",
"display": "Afelimomab"
}
]
},
"effectivePeriod": {
"start": "2017-09-08",
"end": "2017-08-07"
}
}
> *
print COOKIES
10:21:38.058 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:38.679 [print] {
"resourceType": "MedicationAdministration",
"id": "14793",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:42.759+02:00",
"source": "#mMHL2IVFA11KtQCl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB03",
"display": "Afelimomab"
}
]
},
"effectivePeriod": {
"start": "2017-09-08",
"end": "2017-08-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:39.265 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:39.841 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:43.982+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:43.982+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:39.841 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB06",
"display": "Golimumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-06",
"end": "2017-10-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:40.519 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:40.519 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pn4xVA7OSN5jkYsT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14794/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14794/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:40.519 [print] {
"resourceType": "MedicationAdministration",
"id": "14794",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:45.208+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB06",
"display": "Golimumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-06",
"end": "2017-10-10"
}
}
> *
print COOKIES
10:21:40.519 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:40.521 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:40.521 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pn4xVA7OSN5jkYsT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14794/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14794/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:40.521 [print] {
"resourceType": "MedicationAdministration",
"id": "14794",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:45.208+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB06",
"display": "Golimumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-06",
"end": "2017-10-10"
}
}
> *
print COOKIES
10:21:40.521 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:41.150 [print] {
"resourceType": "MedicationAdministration",
"id": "14794",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:45.208+02:00",
"source": "#pn4xVA7OSN5jkYsT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB06",
"display": "Golimumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-06",
"end": "2017-10-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:42.112 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:42.916 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:46.817+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:46.817+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:42.916 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX39",
"display": "Romidepsin"
}
]
},
"effectivePeriod": {
"start": "2013-01-21",
"end": "2013-02-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:43.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:43.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BXAija31642PCgvM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14795/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14795/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:43.591 [print] {
"resourceType": "MedicationAdministration",
"id": "14795",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:48.294+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX39",
"display": "Romidepsin"
}
]
},
"effectivePeriod": {
"start": "2013-01-21",
"end": "2013-02-13"
}
}
> *
print COOKIES
10:21:43.591 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:43.593 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:43.593 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BXAija31642PCgvM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14795/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14795/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:43.593 [print] {
"resourceType": "MedicationAdministration",
"id": "14795",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:48.294+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX39",
"display": "Romidepsin"
}
]
},
"effectivePeriod": {
"start": "2013-01-21",
"end": "2013-02-13"
}
}
> *
print COOKIES
10:21:43.593 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:44.160 [print] {
"resourceType": "MedicationAdministration",
"id": "14795",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:48.294+02:00",
"source": "#BXAija31642PCgvM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX39",
"display": "Romidepsin"
}
]
},
"effectivePeriod": {
"start": "2013-01-21",
"end": "2013-02-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:44.776 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:45.370 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:49.495+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:49.495+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:45.370 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timosina alfa-1"
}
]
},
"effectivePeriod": {
"start": "2013-05-06",
"end": "2013-04-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:45.991 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:45.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"34mtgZIRRwEVkqFk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14796/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14796/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:45.991 [print] {
"resourceType": "MedicationAdministration",
"id": "14796",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:50.699+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timosina alfa-1"
}
]
},
"effectivePeriod": {
"start": "2013-05-06",
"end": "2013-04-05"
}
}
> *
print COOKIES
10:21:45.991 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:45.993 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:45.993 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"34mtgZIRRwEVkqFk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14796/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14796/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:45.993 [print] {
"resourceType": "MedicationAdministration",
"id": "14796",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:50.699+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timosina alfa-1"
}
]
},
"effectivePeriod": {
"start": "2013-05-06",
"end": "2013-04-05"
}
}
> *
print COOKIES
10:21:45.993 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:46.591 [print] {
"resourceType": "MedicationAdministration",
"id": "14796",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:50.699+02:00",
"source": "#34mtgZIRRwEVkqFk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timosina alfa-1"
}
]
},
"effectivePeriod": {
"start": "2013-05-06",
"end": "2013-04-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:47.179 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:47.790 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:51.898+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:51.898+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:47.791 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE11",
"display": "Pazopanib "
}
]
},
"effectivePeriod": {
"start": "2013-06-12",
"end": "2013-06-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:48.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:48.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3CyxsYNegrXD2UBS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14797/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14797/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:48.382 [print] {
"resourceType": "MedicationAdministration",
"id": "14797",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:53.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE11",
"display": "Pazopanib "
}
]
},
"effectivePeriod": {
"start": "2013-06-12",
"end": "2013-06-27"
}
}
> *
print COOKIES
10:21:48.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:48.383 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:48.383 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3CyxsYNegrXD2UBS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14797/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14797/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:48.383 [print] {
"resourceType": "MedicationAdministration",
"id": "14797",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:53.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE11",
"display": "Pazopanib "
}
]
},
"effectivePeriod": {
"start": "2013-06-12",
"end": "2013-06-27"
}
}
> *
print COOKIES
10:21:48.383 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:48.981 [print] {
"resourceType": "MedicationAdministration",
"id": "14797",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:53.090+02:00",
"source": "#3CyxsYNegrXD2UBS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE11",
"display": "Pazopanib "
}
]
},
"effectivePeriod": {
"start": "2013-06-12",
"end": "2013-06-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:49.631 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:50.204 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:54.331+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:54.331+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:50.204 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB01",
"display": "Busulfano"
}
]
},
"effectivePeriod": {
"start": "2013-06-24",
"end": "2013-07-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:50.857 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:50.857 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RzBJ0ec6XmHDgdTh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14798/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14798/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:50.857 [print] {
"resourceType": "MedicationAdministration",
"id": "14798",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:55.545+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB01",
"display": "Busulfano"
}
]
},
"effectivePeriod": {
"start": "2013-06-24",
"end": "2013-07-12"
}
}
> *
print COOKIES
10:21:50.857 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:50.859 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:50.859 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RzBJ0ec6XmHDgdTh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14798/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14798/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:50.859 [print] {
"resourceType": "MedicationAdministration",
"id": "14798",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:55.545+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB01",
"display": "Busulfano"
}
]
},
"effectivePeriod": {
"start": "2013-06-24",
"end": "2013-07-12"
}
}
> *
print COOKIES
10:21:50.859 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:51.427 [print] {
"resourceType": "MedicationAdministration",
"id": "14798",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:55.545+02:00",
"source": "#RzBJ0ec6XmHDgdTh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB01",
"display": "Busulfano"
}
]
},
"effectivePeriod": {
"start": "2013-06-24",
"end": "2013-07-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:52.060 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:52.707 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:56.766+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:56.766+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:52.709 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC10",
"display": "Ofatumumab"
}
]
},
"effectivePeriod": {
"start": "2013-08-08",
"end": "2013-10-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:53.339 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:53.339 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6wTCgXcejYtMYybK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14799/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14799/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:53.339 [print] {
"resourceType": "MedicationAdministration",
"id": "14799",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:58.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC10",
"display": "Ofatumumab"
}
]
},
"effectivePeriod": {
"start": "2013-08-08",
"end": "2013-10-02"
}
}
> *
print COOKIES
10:21:53.339 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:53.354 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:53.354 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6wTCgXcejYtMYybK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14799/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:21:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14799/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:53.354 [print] {
"resourceType": "MedicationAdministration",
"id": "14799",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:58.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC10",
"display": "Ofatumumab"
}
]
},
"effectivePeriod": {
"start": "2013-08-08",
"end": "2013-10-02"
}
}
> *
print COOKIES
10:21:53.354 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:53.995 [print] {
"resourceType": "MedicationAdministration",
"id": "14799",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:21:58.031+02:00",
"source": "#6wTCgXcejYtMYybK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC10",
"display": "Ofatumumab"
}
]
},
"effectivePeriod": {
"start": "2013-08-08",
"end": "2013-10-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:54.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:55.186 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:21:59.327+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:21:59.327+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:55.186 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DA01",
"display": "Dactinomicina"
}
]
},
"effectivePeriod": {
"start": "2013-09-05",
"end": "2014-03-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:55.757 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:55.757 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WFr1mrZQMTtAKVWu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14800/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14800/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:55.757 [print] {
"resourceType": "MedicationAdministration",
"id": "14800",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:00.465+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DA01",
"display": "Dactinomicina"
}
]
},
"effectivePeriod": {
"start": "2013-09-05",
"end": "2014-03-11"
}
}
> *
print COOKIES
10:21:55.757 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:55.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:55.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WFr1mrZQMTtAKVWu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14800/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14800/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:21:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:55.760 [print] {
"resourceType": "MedicationAdministration",
"id": "14800",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:00.465+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DA01",
"display": "Dactinomicina"
}
]
},
"effectivePeriod": {
"start": "2013-09-05",
"end": "2014-03-11"
}
}
> *
print COOKIES
10:21:55.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:56.328 [print] {
"resourceType": "MedicationAdministration",
"id": "14800",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:00.465+02:00",
"source": "#WFr1mrZQMTtAKVWu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DA01",
"display": "Dactinomicina"
}
]
},
"effectivePeriod": {
"start": "2013-09-05",
"end": "2014-03-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:56.955 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:57.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:01.663+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:01.663+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:57.558 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB02",
"display": "Medrossiprogesterone "
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2014-03-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:58.135 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:58.135 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YMIYZi452DSy35mg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14801/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14801/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:58.135 [print] {
"resourceType": "MedicationAdministration",
"id": "14801",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:02.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB02",
"display": "Medrossiprogesterone "
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2014-03-26"
}
}
> *
print COOKIES
10:21:58.135 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:21:58.137 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:21:58.137 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YMIYZi452DSy35mg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14801/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14801/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:21:58.137 [print] {
"resourceType": "MedicationAdministration",
"id": "14801",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:02.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB02",
"display": "Medrossiprogesterone "
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2014-03-26"
}
}
> *
print COOKIES
10:21:58.137 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:21:58.727 [print] {
"resourceType": "MedicationAdministration",
"id": "14801",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:02.845+02:00",
"source": "#YMIYZi452DSy35mg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB02",
"display": "Medrossiprogesterone "
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2014-03-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:21:59.308 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:21:59.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:04.028+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:04.028+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:21:59.947 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CX01",
"display": "Trabectedina"
}
]
},
"effectivePeriod": {
"start": "2014-04-28",
"end": "2014-04-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:00.529 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:00.529 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fjeglXbopK8igmTC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14802/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14802/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:00.529 [print] {
"resourceType": "MedicationAdministration",
"id": "14802",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:05.233+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CX01",
"display": "Trabectedina"
}
]
},
"effectivePeriod": {
"start": "2014-04-28",
"end": "2014-04-08"
}
}
> *
print COOKIES
10:22:00.529 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:00.529 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:00.529 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fjeglXbopK8igmTC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14802/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14802/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:00.529 [print] {
"resourceType": "MedicationAdministration",
"id": "14802",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:05.233+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CX01",
"display": "Trabectedina"
}
]
},
"effectivePeriod": {
"start": "2014-04-28",
"end": "2014-04-08"
}
}
> *
print COOKIES
10:22:00.529 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:01.138 [print] {
"resourceType": "MedicationAdministration",
"id": "14802",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:05.233+02:00",
"source": "#fjeglXbopK8igmTC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CX01",
"display": "Trabectedina"
}
]
},
"effectivePeriod": {
"start": "2014-04-28",
"end": "2014-04-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:01.738 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:02.346 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:06.445+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:06.445+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:02.346 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA19",
"display": "Gusperimus"
}
]
},
"effectivePeriod": {
"start": "2014-09-30",
"end": "2014-06-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:02.977 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:02.977 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F4CVEatCIuCVtM8Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14803/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14803/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:02.977 [print] {
"resourceType": "MedicationAdministration",
"id": "14803",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:07.684+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA19",
"display": "Gusperimus"
}
]
},
"effectivePeriod": {
"start": "2014-09-30",
"end": "2014-06-23"
}
}
> *
print COOKIES
10:22:02.977 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:02.980 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:02.980 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F4CVEatCIuCVtM8Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14803/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14803/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:02.980 [print] {
"resourceType": "MedicationAdministration",
"id": "14803",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:07.684+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA19",
"display": "Gusperimus"
}
]
},
"effectivePeriod": {
"start": "2014-09-30",
"end": "2014-06-23"
}
}
> *
print COOKIES
10:22:02.980 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:03.610 [print] {
"resourceType": "MedicationAdministration",
"id": "14803",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:07.684+02:00",
"source": "#F4CVEatCIuCVtM8Q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA19",
"display": "Gusperimus"
}
]
},
"effectivePeriod": {
"start": "2014-09-30",
"end": "2014-06-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:04.328 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:05.386 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:08.934+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:08.934+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:05.388 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC13",
"display": "Ixekizumab"
}
]
},
"effectivePeriod": {
"start": "2015-01-12",
"end": "2014-10-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:05.960 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:05.960 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"02PRnr9z1pMhroYL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14804/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14804/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:05.960 [print] {
"resourceType": "MedicationAdministration",
"id": "14804",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:10.666+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC13",
"display": "Ixekizumab"
}
]
},
"effectivePeriod": {
"start": "2015-01-12",
"end": "2014-10-01"
}
}
> *
print COOKIES
10:22:05.960 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:05.962 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:05.962 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"02PRnr9z1pMhroYL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14804/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14804/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:05.962 [print] {
"resourceType": "MedicationAdministration",
"id": "14804",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:10.666+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC13",
"display": "Ixekizumab"
}
]
},
"effectivePeriod": {
"start": "2015-01-12",
"end": "2014-10-01"
}
}
> *
print COOKIES
10:22:05.962 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:06.537 [print] {
"resourceType": "MedicationAdministration",
"id": "14804",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:10.666+02:00",
"source": "#02PRnr9z1pMhroYL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC13",
"display": "Ixekizumab"
}
]
},
"effectivePeriod": {
"start": "2015-01-12",
"end": "2014-10-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:07.143 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:07.988 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:11.851+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:11.851+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:07.990 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB08",
"display": "Pirarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2014-11-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:08.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:08.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ND0hASMV2eQMZvYH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14805/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14805/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:08.614 [print] {
"resourceType": "MedicationAdministration",
"id": "14805",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:13.313+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB08",
"display": "Pirarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2014-11-10"
}
}
> *
print COOKIES
10:22:08.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:08.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:08.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ND0hASMV2eQMZvYH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14805/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14805/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:08.614 [print] {
"resourceType": "MedicationAdministration",
"id": "14805",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:13.313+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB08",
"display": "Pirarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2014-11-10"
}
}
> *
print COOKIES
10:22:08.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:09.200 [print] {
"resourceType": "MedicationAdministration",
"id": "14805",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:13.313+02:00",
"source": "#ND0hASMV2eQMZvYH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB08",
"display": "Pirarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2014-11-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:09.823 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:10.425 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:14.545+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:14.545+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:10.441 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE01",
"display": "Buserelina "
}
]
},
"effectivePeriod": {
"start": "2015-05-06",
"end": "2015-01-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:11.000 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:11.000 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aZzECTvm7ekrRCNU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14806/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14806/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:11.000 [print] {
"resourceType": "MedicationAdministration",
"id": "14806",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:15.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE01",
"display": "Buserelina "
}
]
},
"effectivePeriod": {
"start": "2015-05-06",
"end": "2015-01-05"
}
}
> *
print COOKIES
10:22:11.000 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:11.000 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:11.000 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aZzECTvm7ekrRCNU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14806/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14806/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:11.000 [print] {
"resourceType": "MedicationAdministration",
"id": "14806",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:15.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE01",
"display": "Buserelina "
}
]
},
"effectivePeriod": {
"start": "2015-05-06",
"end": "2015-01-05"
}
}
> *
print COOKIES
10:22:11.000 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:11.587 [print] {
"resourceType": "MedicationAdministration",
"id": "14806",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:15.714+02:00",
"source": "#aZzECTvm7ekrRCNU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE01",
"display": "Buserelina "
}
]
},
"effectivePeriod": {
"start": "2015-05-06",
"end": "2015-01-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:12.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:12.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:17.126+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:17.126+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:12.995 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC19",
"display": "Blinatumomab"
}
]
},
"effectivePeriod": {
"start": "2015-11-03",
"end": "2015-05-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:13.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:13.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qTXC1Mb9NP8rtsRh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14807/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14807/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:13.612 [print] {
"resourceType": "MedicationAdministration",
"id": "14807",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:18.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC19",
"display": "Blinatumomab"
}
]
},
"effectivePeriod": {
"start": "2015-11-03",
"end": "2015-05-08"
}
}
> *
print COOKIES
10:22:13.612 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:13.627 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:13.627 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qTXC1Mb9NP8rtsRh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14807/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14807/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:13.627 [print] {
"resourceType": "MedicationAdministration",
"id": "14807",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:18.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC19",
"display": "Blinatumomab"
}
]
},
"effectivePeriod": {
"start": "2015-11-03",
"end": "2015-05-08"
}
}
> *
print COOKIES
10:22:13.627 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:14.260 [print] {
"resourceType": "MedicationAdministration",
"id": "14807",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:18.321+02:00",
"source": "#qTXC1Mb9NP8rtsRh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC19",
"display": "Blinatumomab"
}
]
},
"effectivePeriod": {
"start": "2015-11-03",
"end": "2015-05-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:14.861 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:15.478 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:19.582+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:19.582+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:15.485 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB03",
"display": "Mannosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2015-06-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:16.097 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:16.097 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0tCU5iEQK2Hb9RyR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14808/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14808/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:16.097 [print] {
"resourceType": "MedicationAdministration",
"id": "14808",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:20.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB03",
"display": "Mannosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2015-06-17"
}
}
> *
print COOKIES
10:22:16.097 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:16.097 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:16.097 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0tCU5iEQK2Hb9RyR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14808/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14808/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:16.097 [print] {
"resourceType": "MedicationAdministration",
"id": "14808",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:20.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB03",
"display": "Mannosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2015-06-17"
}
}
> *
print COOKIES
10:22:16.097 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:16.698 [print] {
"resourceType": "MedicationAdministration",
"id": "14808",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:20.809+02:00",
"source": "#0tCU5iEQK2Hb9RyR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB03",
"display": "Mannosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2015-06-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:17.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:17.898 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:22.038+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:22.038+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:17.903 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB01",
"display": "Flutamide"
}
]
},
"effectivePeriod": {
"start": "2015-12-17",
"end": "2015-07-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:18.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:18.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R1T8nFsS6zes4aL2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14809/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14809/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:18.472 [print] {
"resourceType": "MedicationAdministration",
"id": "14809",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:23.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB01",
"display": "Flutamide"
}
]
},
"effectivePeriod": {
"start": "2015-12-17",
"end": "2015-07-16"
}
}
> *
print COOKIES
10:22:18.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:18.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:18.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R1T8nFsS6zes4aL2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14809/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14809/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:18.472 [print] {
"resourceType": "MedicationAdministration",
"id": "14809",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:23.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB01",
"display": "Flutamide"
}
]
},
"effectivePeriod": {
"start": "2015-12-17",
"end": "2015-07-16"
}
}
> *
print COOKIES
10:22:18.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:19.094 [print] {
"resourceType": "MedicationAdministration",
"id": "14809",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:23.186+02:00",
"source": "#R1T8nFsS6zes4aL2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB01",
"display": "Flutamide"
}
]
},
"effectivePeriod": {
"start": "2015-12-17",
"end": "2015-07-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:19.700 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:20.339 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:24.413+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:24.413+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:20.339 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC09",
"display": "Catumaxomab"
}
]
},
"effectivePeriod": {
"start": "2016-03-22",
"end": "2015-08-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:20.964 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:20.964 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OiX2oilKpQooVz4P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14810/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14810/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:20.964 [print] {
"resourceType": "MedicationAdministration",
"id": "14810",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:25.663+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC09",
"display": "Catumaxomab"
}
]
},
"effectivePeriod": {
"start": "2016-03-22",
"end": "2015-08-12"
}
}
> *
print COOKIES
10:22:20.964 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:20.965 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:20.965 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OiX2oilKpQooVz4P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14810/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14810/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:20.965 [print] {
"resourceType": "MedicationAdministration",
"id": "14810",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:25.663+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC09",
"display": "Catumaxomab"
}
]
},
"effectivePeriod": {
"start": "2016-03-22",
"end": "2015-08-12"
}
}
> *
print COOKIES
10:22:20.965 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:21.530 [print] {
"resourceType": "MedicationAdministration",
"id": "14810",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:25.663+02:00",
"source": "#OiX2oilKpQooVz4P",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC09",
"display": "Catumaxomab"
}
]
},
"effectivePeriod": {
"start": "2016-03-22",
"end": "2015-08-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:22.109 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:22.711 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:26.823+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:26.823+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:22.711 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC02",
"display": "Oprelvekin"
}
]
},
"effectivePeriod": {
"start": "2016-05-13",
"end": "2015-12-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:24.303 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:24.303 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FiJ8aUjESUWWjw4f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14811/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14811/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:24.303 [print] {
"resourceType": "MedicationAdministration",
"id": "14811",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:29.014+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC02",
"display": "Oprelvekin"
}
]
},
"effectivePeriod": {
"start": "2016-05-13",
"end": "2015-12-31"
}
}
> *
print COOKIES
10:22:24.303 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:24.303 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:24.303 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FiJ8aUjESUWWjw4f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14811/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14811/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:24.303 [print] {
"resourceType": "MedicationAdministration",
"id": "14811",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:29.014+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC02",
"display": "Oprelvekin"
}
]
},
"effectivePeriod": {
"start": "2016-05-13",
"end": "2015-12-31"
}
}
> *
print COOKIES
10:22:24.303 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:24.893 [print] {
"resourceType": "MedicationAdministration",
"id": "14811",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:29.014+02:00",
"source": "#FiJ8aUjESUWWjw4f",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC02",
"display": "Oprelvekin"
}
]
},
"effectivePeriod": {
"start": "2016-05-13",
"end": "2015-12-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:25.494 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:27.313 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:30.184+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:30.184+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:27.313 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC06",
"display": "Mepolizumab"
}
]
},
"effectivePeriod": {
"start": "2016-06-17",
"end": "2016-03-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:28.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:28.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wCKXZx9pFlOJfrhj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14812/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14812/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:28.146 [print] {
"resourceType": "MedicationAdministration",
"id": "14812",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:32.842+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC06",
"display": "Mepolizumab"
}
]
},
"effectivePeriod": {
"start": "2016-06-17",
"end": "2016-03-15"
}
}
> *
print COOKIES
10:22:28.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:28.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:28.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wCKXZx9pFlOJfrhj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14812/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14812/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:28.146 [print] {
"resourceType": "MedicationAdministration",
"id": "14812",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:32.842+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC06",
"display": "Mepolizumab"
}
]
},
"effectivePeriod": {
"start": "2016-06-17",
"end": "2016-03-15"
}
}
> *
print COOKIES
10:22:28.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:28.748 [print] {
"resourceType": "MedicationAdministration",
"id": "14812",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:32.842+02:00",
"source": "#wCKXZx9pFlOJfrhj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC06",
"display": "Mepolizumab"
}
]
},
"effectivePeriod": {
"start": "2016-06-17",
"end": "2016-03-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:29.350 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:29.974 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:34.064+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:34.064+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:29.974 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XB01",
"display": "Procarbazina "
}
]
},
"effectivePeriod": {
"start": "2016-07-27",
"end": "2016-07-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:30.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:30.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9lyyPJbQjivj2fTE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14813/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14813/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:30.553 [print] {
"resourceType": "MedicationAdministration",
"id": "14813",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:35.262+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XB01",
"display": "Procarbazina "
}
]
},
"effectivePeriod": {
"start": "2016-07-27",
"end": "2016-07-29"
}
}
> *
print COOKIES
10:22:30.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:30.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:30.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9lyyPJbQjivj2fTE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14813/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14813/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:30.553 [print] {
"resourceType": "MedicationAdministration",
"id": "14813",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:35.262+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XB01",
"display": "Procarbazina "
}
]
},
"effectivePeriod": {
"start": "2016-07-27",
"end": "2016-07-29"
}
}
> *
print COOKIES
10:22:30.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:31.182 [print] {
"resourceType": "MedicationAdministration",
"id": "14813",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:35.262+02:00",
"source": "#9lyyPJbQjivj2fTE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XB01",
"display": "Procarbazina "
}
]
},
"effectivePeriod": {
"start": "2016-07-27",
"end": "2016-07-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:31.777 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:32.348 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:36.492+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:36.492+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:32.348 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB07",
"display": "Interferone beta-1a"
}
]
},
"effectivePeriod": {
"start": "2016-08-18",
"end": "2016-09-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:32.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:32.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GwVvAZHCmWGXMIAq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14814/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14814/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:32.966 [print] {
"resourceType": "MedicationAdministration",
"id": "14814",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:37.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB07",
"display": "Interferone beta-1a"
}
]
},
"effectivePeriod": {
"start": "2016-08-18",
"end": "2016-09-05"
}
}
> *
print COOKIES
10:22:32.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:32.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:32.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GwVvAZHCmWGXMIAq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14814/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14814/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:32.966 [print] {
"resourceType": "MedicationAdministration",
"id": "14814",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:37.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB07",
"display": "Interferone beta-1a"
}
]
},
"effectivePeriod": {
"start": "2016-08-18",
"end": "2016-09-05"
}
}
> *
print COOKIES
10:22:32.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:34.527 [print] {
"resourceType": "MedicationAdministration",
"id": "14814",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:37.682+02:00",
"source": "#GwVvAZHCmWGXMIAq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB07",
"display": "Interferone beta-1a"
}
]
},
"effectivePeriod": {
"start": "2016-08-18",
"end": "2016-09-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:35.128 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:35.678 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:39.827+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:39.827+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:35.678 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Cytarabina"
}
]
},
"effectivePeriod": {
"start": "2016-10-10",
"end": "2016-12-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:36.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:36.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BU5PaAsuV6vVW810"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14815/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14815/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:36.305 [print] {
"resourceType": "MedicationAdministration",
"id": "14815",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:41.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Cytarabina"
}
]
},
"effectivePeriod": {
"start": "2016-10-10",
"end": "2016-12-23"
}
}
> *
print COOKIES
10:22:36.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:36.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:36.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BU5PaAsuV6vVW810"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14815/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14815/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:36.305 [print] {
"resourceType": "MedicationAdministration",
"id": "14815",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:41.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Cytarabina"
}
]
},
"effectivePeriod": {
"start": "2016-10-10",
"end": "2016-12-23"
}
}
> *
print COOKIES
10:22:36.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:36.893 [print] {
"resourceType": "MedicationAdministration",
"id": "14815",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:41.015+02:00",
"source": "#BU5PaAsuV6vVW810",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Cytarabina"
}
]
},
"effectivePeriod": {
"start": "2016-10-10",
"end": "2016-12-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:37.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:38.136 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:42.233+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:42.233+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:38.136 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE35",
"display": "Osimertinib"
}
]
},
"effectivePeriod": {
"start": "2017-02-01",
"end": "2017-01-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:38.753 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:38.753 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FImhFi1EHzEMOOFx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14816/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14816/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:38.753 [print] {
"resourceType": "MedicationAdministration",
"id": "14816",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:43.465+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE35",
"display": "Osimertinib"
}
]
},
"effectivePeriod": {
"start": "2017-02-01",
"end": "2017-01-30"
}
}
> *
print COOKIES
10:22:38.753 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:38.753 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:38.753 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FImhFi1EHzEMOOFx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14816/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14816/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:38.753 [print] {
"resourceType": "MedicationAdministration",
"id": "14816",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:43.465+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE35",
"display": "Osimertinib"
}
]
},
"effectivePeriod": {
"start": "2017-02-01",
"end": "2017-01-30"
}
}
> *
print COOKIES
10:22:38.753 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:39.390 [print] {
"resourceType": "MedicationAdministration",
"id": "14816",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:43.465+02:00",
"source": "#FImhFi1EHzEMOOFx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE35",
"display": "Osimertinib"
}
]
},
"effectivePeriod": {
"start": "2017-02-01",
"end": "2017-01-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:39.975 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:40.571 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:44.688+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:44.688+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:40.571 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB02",
"display": "Interferone beta natural"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2017-04-20"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:41.176 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:41.176 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VNu5VTtlzFycTvQd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14817/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14817/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:41.176 [print] {
"resourceType": "MedicationAdministration",
"id": "14817",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:45.898+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB02",
"display": "Interferone beta natural"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2017-04-20"
}
}
> *
print COOKIES
10:22:41.176 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:41.176 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:41.176 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VNu5VTtlzFycTvQd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14817/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14817/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:41.176 [print] {
"resourceType": "MedicationAdministration",
"id": "14817",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:45.898+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB02",
"display": "Interferone beta natural"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2017-04-20"
}
}
> *
print COOKIES
10:22:41.176 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:41.785 [print] {
"resourceType": "MedicationAdministration",
"id": "14817",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:45.898+02:00",
"source": "#VNu5VTtlzFycTvQd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB02",
"display": "Interferone beta natural"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2017-04-20"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:42.375 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:42.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:47.094+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:47.094+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:42.977 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB06",
"display": "Clofarabina"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-09-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:43.762 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:43.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2blbQI9j6VK2tvuX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14818/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14818/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:43.762 [print] {
"resourceType": "MedicationAdministration",
"id": "14818",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:48.478+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB06",
"display": "Clofarabina"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-09-05"
}
}
> *
print COOKIES
10:22:43.762 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:43.762 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:43.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2blbQI9j6VK2tvuX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14818/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14818/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:43.762 [print] {
"resourceType": "MedicationAdministration",
"id": "14818",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:48.478+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB06",
"display": "Clofarabina"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-09-05"
}
}
> *
print COOKIES
10:22:43.762 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:44.342 [print] {
"resourceType": "MedicationAdministration",
"id": "14818",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:48.478+02:00",
"source": "#2blbQI9j6VK2tvuX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB06",
"display": "Clofarabina"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-09-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:45.060 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:45.629 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:49.756+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:49.756+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:45.629 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC03",
"display": "Trastuzumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-26",
"end": "2017-12-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:46.235 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:46.235 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jUimRbBBAD0GkB3b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14819/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14819/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:46.235 [print] {
"resourceType": "MedicationAdministration",
"id": "14819",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:50.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC03",
"display": "Trastuzumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-26",
"end": "2017-12-28"
}
}
> *
print COOKIES
10:22:46.235 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:46.235 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:46.235 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jUimRbBBAD0GkB3b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14819/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14819/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:46.251 [print] {
"resourceType": "MedicationAdministration",
"id": "14819",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:50.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC03",
"display": "Trastuzumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-26",
"end": "2017-12-28"
}
}
> *
print COOKIES
10:22:46.251 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:47.844 [print] {
"resourceType": "MedicationAdministration",
"id": "14819",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:50.948+02:00",
"source": "#jUimRbBBAD0GkB3b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC03",
"display": "Trastuzumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-26",
"end": "2017-12-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:48.445 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:49.069 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:53.145+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:53.145+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:49.069 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX03",
"display": "BCG vaccine"
}
]
},
"effectivePeriod": {
"start": "2013-05-15",
"end": "2012-09-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:49.674 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:49.674 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GKmr09yDDjGQaXJP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14820/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14820/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:49.674 [print] {
"resourceType": "MedicationAdministration",
"id": "14820",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:54.369+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX03",
"display": "BCG vaccine"
}
]
},
"effectivePeriod": {
"start": "2013-05-15",
"end": "2012-09-18"
}
}
> *
print COOKIES
10:22:49.674 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:49.674 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:49.674 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GKmr09yDDjGQaXJP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14820/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14820/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:49.674 [print] {
"resourceType": "MedicationAdministration",
"id": "14820",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:54.369+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX03",
"display": "BCG vaccine"
}
]
},
"effectivePeriod": {
"start": "2013-05-15",
"end": "2012-09-18"
}
}
> *
print COOKIES
10:22:49.674 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:50.276 [print] {
"resourceType": "MedicationAdministration",
"id": "14820",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:54.369+02:00",
"source": "#GKmr09yDDjGQaXJP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX03",
"display": "BCG vaccine"
}
]
},
"effectivePeriod": {
"start": "2013-05-15",
"end": "2012-09-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:50.893 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:51.501 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:55.599+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:55.599+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:51.501 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB10",
"display": "Peginterferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2013-08-19",
"end": "2012-11-20"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:52.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:52.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yC3tpiiczTWUDKgD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14821/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14821/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:52.111 [print] {
"resourceType": "MedicationAdministration",
"id": "14821",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:56.827+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB10",
"display": "Peginterferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2013-08-19",
"end": "2012-11-20"
}
}
> *
print COOKIES
10:22:52.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:52.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:52.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yC3tpiiczTWUDKgD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14821/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14821/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:52.111 [print] {
"resourceType": "MedicationAdministration",
"id": "14821",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:56.827+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB10",
"display": "Peginterferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2013-08-19",
"end": "2012-11-20"
}
}
> *
print COOKIES
10:22:52.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:52.747 [print] {
"resourceType": "MedicationAdministration",
"id": "14821",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:56.827+02:00",
"source": "#yC3tpiiczTWUDKgD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB10",
"display": "Peginterferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2013-08-19",
"end": "2012-11-20"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:53.367 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:53.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:22:58.073+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:22:58.073+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:53.938 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE31",
"display": "Nintedanib"
}
]
},
"effectivePeriod": {
"start": "2013-10-11",
"end": "2013-12-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:54.567 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:54.567 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fqs18oW6DBljOJqK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14822/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14822/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:54.567 [print] {
"resourceType": "MedicationAdministration",
"id": "14822",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:59.280+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE31",
"display": "Nintedanib"
}
]
},
"effectivePeriod": {
"start": "2013-10-11",
"end": "2013-12-10"
}
}
> *
print COOKIES
10:22:54.567 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:54.567 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:54.567 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fqs18oW6DBljOJqK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14822/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:22:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14822/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:22:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:54.567 [print] {
"resourceType": "MedicationAdministration",
"id": "14822",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:59.280+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE31",
"display": "Nintedanib"
}
]
},
"effectivePeriod": {
"start": "2013-10-11",
"end": "2013-12-10"
}
}
> *
print COOKIES
10:22:54.567 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:55.186 [print] {
"resourceType": "MedicationAdministration",
"id": "14822",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:22:59.280+02:00",
"source": "#Fqs18oW6DBljOJqK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE31",
"display": "Nintedanib"
}
]
},
"effectivePeriod": {
"start": "2013-10-11",
"end": "2013-12-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:56.790 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:57.423 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:01.496+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:01.496+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:57.423 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX11",
"display": "Estramustina"
}
]
},
"effectivePeriod": {
"start": "2014-01-10",
"end": "2014-01-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:58.025 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:58.025 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fcogrOAGW1T43g7x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14823/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14823/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:58.025 [print] {
"resourceType": "MedicationAdministration",
"id": "14823",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:02.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX11",
"display": "Estramustina"
}
]
},
"effectivePeriod": {
"start": "2014-01-10",
"end": "2014-01-08"
}
}
> *
print COOKIES
10:22:58.025 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:22:58.025 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:22:58.025 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fcogrOAGW1T43g7x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14823/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14823/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:22:58.025 [print] {
"resourceType": "MedicationAdministration",
"id": "14823",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:02.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX11",
"display": "Estramustina"
}
]
},
"effectivePeriod": {
"start": "2014-01-10",
"end": "2014-01-08"
}
}
> *
print COOKIES
10:22:58.025 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:22:58.626 [print] {
"resourceType": "MedicationAdministration",
"id": "14823",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:02.722+02:00",
"source": "#fcogrOAGW1T43g7x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX11",
"display": "Estramustina"
}
]
},
"effectivePeriod": {
"start": "2014-01-10",
"end": "2014-01-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:22:59.265 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:22:59.844 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:03.960+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:03.960+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:22:59.860 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA03",
"display": "Oxaliplatino"
}
]
},
"effectivePeriod": {
"start": "2014-08-05",
"end": "2014-05-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:00.470 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:00.470 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r0m7QTDC67WqTTr0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14824/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14824/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:00.470 [print] {
"resourceType": "MedicationAdministration",
"id": "14824",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:05.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA03",
"display": "Oxaliplatino"
}
]
},
"effectivePeriod": {
"start": "2014-08-05",
"end": "2014-05-23"
}
}
> *
print COOKIES
10:23:00.470 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:00.470 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:00.470 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r0m7QTDC67WqTTr0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14824/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14824/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:00.470 [print] {
"resourceType": "MedicationAdministration",
"id": "14824",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:05.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA03",
"display": "Oxaliplatino"
}
]
},
"effectivePeriod": {
"start": "2014-08-05",
"end": "2014-05-23"
}
}
> *
print COOKIES
10:23:00.470 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:01.044 [print] {
"resourceType": "MedicationAdministration",
"id": "14824",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:05.187+02:00",
"source": "#r0m7QTDC67WqTTr0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA03",
"display": "Oxaliplatino"
}
]
},
"effectivePeriod": {
"start": "2014-08-05",
"end": "2014-05-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:01.649 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:02.270 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:06.368+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:06.368+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:02.270 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD04",
"display": "Acido 5 aminolevulinico"
}
]
},
"effectivePeriod": {
"start": "2014-09-17",
"end": "2014-06-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:02.895 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:02.895 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3bv7XFKhrdiEvmkq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14825/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14825/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:02.895 [print] {
"resourceType": "MedicationAdministration",
"id": "14825",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:07.600+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD04",
"display": "Acido 5 aminolevulinico"
}
]
},
"effectivePeriod": {
"start": "2014-09-17",
"end": "2014-06-27"
}
}
> *
print COOKIES
10:23:02.895 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:02.895 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:02.895 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3bv7XFKhrdiEvmkq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14825/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14825/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:02.895 [print] {
"resourceType": "MedicationAdministration",
"id": "14825",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:07.600+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD04",
"display": "Acido 5 aminolevulinico"
}
]
},
"effectivePeriod": {
"start": "2014-09-17",
"end": "2014-06-27"
}
}
> *
print COOKIES
10:23:02.895 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:03.514 [print] {
"resourceType": "MedicationAdministration",
"id": "14825",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:07.600+02:00",
"source": "#3bv7XFKhrdiEvmkq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD04",
"display": "Acido 5 aminolevulinico"
}
]
},
"effectivePeriod": {
"start": "2014-09-17",
"end": "2014-06-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:04.099 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:04.679 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:08.809+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:08.809+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:04.679 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA04",
"display": "Vinorelbina "
}
]
},
"effectivePeriod": {
"start": "2014-11-26",
"end": "2014-09-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:05.251 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:05.251 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vtKrj3Mfjye8TuEz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14826/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14826/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:05.251 [print] {
"resourceType": "MedicationAdministration",
"id": "14826",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:09.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA04",
"display": "Vinorelbina "
}
]
},
"effectivePeriod": {
"start": "2014-11-26",
"end": "2014-09-23"
}
}
> *
print COOKIES
10:23:05.251 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:05.251 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:05.266 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vtKrj3Mfjye8TuEz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14826/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14826/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:05.266 [print] {
"resourceType": "MedicationAdministration",
"id": "14826",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:09.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA04",
"display": "Vinorelbina "
}
]
},
"effectivePeriod": {
"start": "2014-11-26",
"end": "2014-09-23"
}
}
> *
print COOKIES
10:23:05.266 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:05.852 [print] {
"resourceType": "MedicationAdministration",
"id": "14826",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:09.967+02:00",
"source": "#vtKrj3Mfjye8TuEz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA04",
"display": "Vinorelbina "
}
]
},
"effectivePeriod": {
"start": "2014-11-26",
"end": "2014-09-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:07.481 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:08.091 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:12.189+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:12.189+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:08.091 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA03",
"display": "Immunoglobulina antilinfocitaria (cavallo)"
}
]
},
"effectivePeriod": {
"start": "2014-12-03",
"end": "2014-11-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:08.679 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"671"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:08.679 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5s0jdU0pGpHUXYtM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14827/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14827/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:08.679 [print] {
"resourceType": "MedicationAdministration",
"id": "14827",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:13.395+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA03",
"display": "Immunoglobulina antilinfocitaria (cavallo)"
}
]
},
"effectivePeriod": {
"start": "2014-12-03",
"end": "2014-11-28"
}
}
> *
print COOKIES
10:23:08.679 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:08.679 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"671"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:08.679 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5s0jdU0pGpHUXYtM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14827/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14827/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:08.679 [print] {
"resourceType": "MedicationAdministration",
"id": "14827",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:13.395+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA03",
"display": "Immunoglobulina antilinfocitaria (cavallo)"
}
]
},
"effectivePeriod": {
"start": "2014-12-03",
"end": "2014-11-28"
}
}
> *
print COOKIES
10:23:08.679 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:09.296 [print] {
"resourceType": "MedicationAdministration",
"id": "14827",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:13.395+02:00",
"source": "#5s0jdU0pGpHUXYtM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA03",
"display": "Immunoglobulina antilinfocitaria (cavallo)"
}
]
},
"effectivePeriod": {
"start": "2014-12-03",
"end": "2014-11-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:09.886 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:10.693 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:14.601+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:14.601+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:10.709 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB05",
"display": "Zorubicina"
}
]
},
"effectivePeriod": {
"start": "2015-07-20",
"end": "2014-12-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:11.294 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:11.294 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SQMT4vIWmfybvJWl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14828/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14828/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:11.294 [print] {
"resourceType": "MedicationAdministration",
"id": "14828",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:16.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB05",
"display": "Zorubicina"
}
]
},
"effectivePeriod": {
"start": "2015-07-20",
"end": "2014-12-23"
}
}
> *
print COOKIES
10:23:11.294 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:11.294 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:11.294 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SQMT4vIWmfybvJWl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14828/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14828/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:11.294 [print] {
"resourceType": "MedicationAdministration",
"id": "14828",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:16.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB05",
"display": "Zorubicina"
}
]
},
"effectivePeriod": {
"start": "2015-07-20",
"end": "2014-12-23"
}
}
> *
print COOKIES
10:23:11.294 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:11.896 [print] {
"resourceType": "MedicationAdministration",
"id": "14828",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:16.006+02:00",
"source": "#SQMT4vIWmfybvJWl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB05",
"display": "Zorubicina"
}
]
},
"effectivePeriod": {
"start": "2015-07-20",
"end": "2014-12-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:13.531 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:14.148 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:18.239+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:18.239+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:14.148 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX14",
"display": "Histamine dihydrochloride"
}
]
},
"effectivePeriod": {
"start": "2015-07-29",
"end": "2015-02-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:14.762 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"654"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:14.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iCS2ecGllblDWHqP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14829/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14829/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:14.762 [print] {
"resourceType": "MedicationAdministration",
"id": "14829",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:19.462+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX14",
"display": "Histamine dihydrochloride"
}
]
},
"effectivePeriod": {
"start": "2015-07-29",
"end": "2015-02-23"
}
}
> *
print COOKIES
10:23:14.762 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:14.764 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"654"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:14.764 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iCS2ecGllblDWHqP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14829/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14829/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:14.764 [print] {
"resourceType": "MedicationAdministration",
"id": "14829",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:19.462+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX14",
"display": "Histamine dihydrochloride"
}
]
},
"effectivePeriod": {
"start": "2015-07-29",
"end": "2015-02-23"
}
}
> *
print COOKIES
10:23:14.764 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:15.325 [print] {
"resourceType": "MedicationAdministration",
"id": "14829",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:19.462+02:00",
"source": "#iCS2ecGllblDWHqP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX14",
"display": "Histamine dihydrochloride"
}
]
},
"effectivePeriod": {
"start": "2015-07-29",
"end": "2015-02-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:15.962 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:16.574 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:20.674+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:20.674+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:16.574 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE06",
"display": "Dasatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-21",
"end": "2015-02-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:17.164 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:17.164 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qdrYVcgMpo5gSVIH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14830/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14830/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:17.164 [print] {
"resourceType": "MedicationAdministration",
"id": "14830",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:21.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE06",
"display": "Dasatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-21",
"end": "2015-02-24"
}
}
> *
print COOKIES
10:23:17.164 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:17.164 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:17.164 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qdrYVcgMpo5gSVIH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14830/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14830/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:17.164 [print] {
"resourceType": "MedicationAdministration",
"id": "14830",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:21.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE06",
"display": "Dasatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-21",
"end": "2015-02-24"
}
}
> *
print COOKIES
10:23:17.164 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:18.755 [print] {
"resourceType": "MedicationAdministration",
"id": "14830",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:21.854+02:00",
"source": "#qdrYVcgMpo5gSVIH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE06",
"display": "Dasatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-21",
"end": "2015-02-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:19.341 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:20.019 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:24.059+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:24.059+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:20.019 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB01",
"display": "Etanercept"
}
]
},
"effectivePeriod": {
"start": "2015-12-23",
"end": "2015-10-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:20.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:20.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5yah2s2EVzZmnpEP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14831/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14831/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:20.623 [print] {
"resourceType": "MedicationAdministration",
"id": "14831",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:25.338+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB01",
"display": "Etanercept"
}
]
},
"effectivePeriod": {
"start": "2015-12-23",
"end": "2015-10-13"
}
}
> *
print COOKIES
10:23:20.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:20.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:20.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5yah2s2EVzZmnpEP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14831/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14831/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:20.623 [print] {
"resourceType": "MedicationAdministration",
"id": "14831",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:25.338+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB01",
"display": "Etanercept"
}
]
},
"effectivePeriod": {
"start": "2015-12-23",
"end": "2015-10-13"
}
}
> *
print COOKIES
10:23:20.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:21.226 [print] {
"resourceType": "MedicationAdministration",
"id": "14831",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:25.338+02:00",
"source": "#5yah2s2EVzZmnpEP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB01",
"display": "Etanercept"
}
]
},
"effectivePeriod": {
"start": "2015-12-23",
"end": "2015-10-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:21.816 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:22.396 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:26.533+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:26.533+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:22.396 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX03",
"display": "Abiraterone"
}
]
},
"effectivePeriod": {
"start": "2016-01-12",
"end": "2015-10-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:23.005 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:23.005 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IVCU1z7asaNZbsKz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14832/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14832/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:23.005 [print] {
"resourceType": "MedicationAdministration",
"id": "14832",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:27.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX03",
"display": "Abiraterone"
}
]
},
"effectivePeriod": {
"start": "2016-01-12",
"end": "2015-10-30"
}
}
> *
print COOKIES
10:23:23.005 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:23.005 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:23.005 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IVCU1z7asaNZbsKz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14832/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14832/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:23.005 [print] {
"resourceType": "MedicationAdministration",
"id": "14832",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:27.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX03",
"display": "Abiraterone"
}
]
},
"effectivePeriod": {
"start": "2016-01-12",
"end": "2015-10-30"
}
}
> *
print COOKIES
10:23:23.005 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:23.579 [print] {
"resourceType": "MedicationAdministration",
"id": "14832",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:27.711+02:00",
"source": "#IVCU1z7asaNZbsKz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX03",
"display": "Abiraterone"
}
]
},
"effectivePeriod": {
"start": "2016-01-12",
"end": "2015-10-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:24.234 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:24.852 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:28.935+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:28.935+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:24.852 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE02",
"display": "Leuprorelina "
}
]
},
"effectivePeriod": {
"start": "2016-03-15",
"end": "2015-11-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:25.476 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:25.476 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WfMIaYzckkkS9VYi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14833/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14833/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:25.476 [print] {
"resourceType": "MedicationAdministration",
"id": "14833",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:30.182+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE02",
"display": "Leuprorelina "
}
]
},
"effectivePeriod": {
"start": "2016-03-15",
"end": "2015-11-03"
}
}
> *
print COOKIES
10:23:25.476 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:25.476 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:25.476 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WfMIaYzckkkS9VYi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14833/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14833/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:25.476 [print] {
"resourceType": "MedicationAdministration",
"id": "14833",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:30.182+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE02",
"display": "Leuprorelina "
}
]
},
"effectivePeriod": {
"start": "2016-03-15",
"end": "2015-11-03"
}
}
> *
print COOKIES
10:23:25.476 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:26.081 [print] {
"resourceType": "MedicationAdministration",
"id": "14833",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:30.182+02:00",
"source": "#WfMIaYzckkkS9VYi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE02",
"display": "Leuprorelina "
}
]
},
"effectivePeriod": {
"start": "2016-03-15",
"end": "2015-11-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:26.703 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:27.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:31.401+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:31.401+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:27.323 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC03",
"display": "Mitomicina"
}
]
},
"effectivePeriod": {
"start": "2016-04-22",
"end": "2016-02-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:27.940 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:27.940 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CStvzYgAvyrzmziy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14834/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14834/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:27.940 [print] {
"resourceType": "MedicationAdministration",
"id": "14834",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:32.653+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC03",
"display": "Mitomicina"
}
]
},
"effectivePeriod": {
"start": "2016-04-22",
"end": "2016-02-04"
}
}
> *
print COOKIES
10:23:27.940 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:27.940 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:27.940 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CStvzYgAvyrzmziy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14834/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14834/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:27.956 [print] {
"resourceType": "MedicationAdministration",
"id": "14834",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:32.653+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC03",
"display": "Mitomicina"
}
]
},
"effectivePeriod": {
"start": "2016-04-22",
"end": "2016-02-04"
}
}
> *
print COOKIES
10:23:27.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:28.780 [print] {
"resourceType": "MedicationAdministration",
"id": "14834",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:32.653+02:00",
"source": "#CStvzYgAvyrzmziy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC03",
"display": "Mitomicina"
}
]
},
"effectivePeriod": {
"start": "2016-04-22",
"end": "2016-02-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:29.598 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:30.470 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:34.323+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:34.323+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:30.470 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD01",
"display": "Paclitaxel "
}
]
},
"effectivePeriod": {
"start": "2016-05-19",
"end": "2016-09-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:31.103 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:31.103 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dQ4wxaDKqqXixHmA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14835/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14835/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:31.103 [print] {
"resourceType": "MedicationAdministration",
"id": "14835",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:35.824+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD01",
"display": "Paclitaxel "
}
]
},
"effectivePeriod": {
"start": "2016-05-19",
"end": "2016-09-21"
}
}
> *
print COOKIES
10:23:31.103 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:31.118 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:31.118 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dQ4wxaDKqqXixHmA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14835/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14835/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:31.118 [print] {
"resourceType": "MedicationAdministration",
"id": "14835",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:35.824+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD01",
"display": "Paclitaxel "
}
]
},
"effectivePeriod": {
"start": "2016-05-19",
"end": "2016-09-21"
}
}
> *
print COOKIES
10:23:31.118 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:31.720 [print] {
"resourceType": "MedicationAdministration",
"id": "14835",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:35.824+02:00",
"source": "#dQ4wxaDKqqXixHmA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD01",
"display": "Paclitaxel "
}
]
},
"effectivePeriod": {
"start": "2016-05-19",
"end": "2016-09-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:32.321 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:32.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:37.023+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:37.023+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:32.979 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD07",
"display": "Ranimustina"
}
]
},
"effectivePeriod": {
"start": "2016-08-09",
"end": "2016-10-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:33.643 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:33.643 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A4BD9rY4inUW8UIG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14836/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14836/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:33.643 [print] {
"resourceType": "MedicationAdministration",
"id": "14836",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:38.343+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD07",
"display": "Ranimustina"
}
]
},
"effectivePeriod": {
"start": "2016-08-09",
"end": "2016-10-18"
}
}
> *
print COOKIES
10:23:33.643 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:33.643 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:33.643 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A4BD9rY4inUW8UIG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14836/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14836/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:33.643 [print] {
"resourceType": "MedicationAdministration",
"id": "14836",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:38.343+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD07",
"display": "Ranimustina"
}
]
},
"effectivePeriod": {
"start": "2016-08-09",
"end": "2016-10-18"
}
}
> *
print COOKIES
10:23:33.643 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:34.198 [print] {
"resourceType": "MedicationAdministration",
"id": "14836",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:38.343+02:00",
"source": "#A4BD9rY4inUW8UIG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD07",
"display": "Ranimustina"
}
]
},
"effectivePeriod": {
"start": "2016-08-09",
"end": "2016-10-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:34.784 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:35.566 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:39.496+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:39.496+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:35.566 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA13",
"display": "Leflunomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2016-10-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:36.344 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:36.344 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RyacUD2v5UhLAsvO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14837/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14837/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:36.344 [print] {
"resourceType": "MedicationAdministration",
"id": "14837",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:41.054+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA13",
"display": "Leflunomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2016-10-25"
}
}
> *
print COOKIES
10:23:36.344 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:36.344 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:36.344 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RyacUD2v5UhLAsvO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14837/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14837/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:36.344 [print] {
"resourceType": "MedicationAdministration",
"id": "14837",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:41.054+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA13",
"display": "Leflunomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2016-10-25"
}
}
> *
print COOKIES
10:23:36.344 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:36.962 [print] {
"resourceType": "MedicationAdministration",
"id": "14837",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:41.054+02:00",
"source": "#RyacUD2v5UhLAsvO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA13",
"display": "Leflunomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2016-10-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:38.635 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:39.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:43.352+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:43.352+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:39.252 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA34",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2016-12-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:39.873 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:39.873 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RHASM2i7QPHKzcyC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14838/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14838/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:39.873 [print] {
"resourceType": "MedicationAdministration",
"id": "14838",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:44.576+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA34",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2016-12-16"
}
}
> *
print COOKIES
10:23:39.873 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:39.873 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:39.873 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RHASM2i7QPHKzcyC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14838/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14838/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:39.873 [print] {
"resourceType": "MedicationAdministration",
"id": "14838",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:44.576+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA34",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2016-12-16"
}
}
> *
print COOKIES
10:23:39.873 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:40.528 [print] {
"resourceType": "MedicationAdministration",
"id": "14838",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:44.576+02:00",
"source": "#RHASM2i7QPHKzcyC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA34",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2016-12-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:41.119 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:41.726 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:45.827+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:45.827+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:41.726 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD03",
"display": "Semustina"
}
]
},
"effectivePeriod": {
"start": "2017-02-28",
"end": "2017-03-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:42.350 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:42.350 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dvwv66GmaNmsAamM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14839/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14839/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:42.350 [print] {
"resourceType": "MedicationAdministration",
"id": "14839",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:47.070+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD03",
"display": "Semustina"
}
]
},
"effectivePeriod": {
"start": "2017-02-28",
"end": "2017-03-07"
}
}
> *
print COOKIES
10:23:42.350 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:42.350 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:42.350 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dvwv66GmaNmsAamM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14839/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14839/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:42.350 [print] {
"resourceType": "MedicationAdministration",
"id": "14839",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:47.070+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD03",
"display": "Semustina"
}
]
},
"effectivePeriod": {
"start": "2017-02-28",
"end": "2017-03-07"
}
}
> *
print COOKIES
10:23:42.350 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:42.983 [print] {
"resourceType": "MedicationAdministration",
"id": "14839",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:47.070+02:00",
"source": "#Dvwv66GmaNmsAamM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD03",
"display": "Semustina"
}
]
},
"effectivePeriod": {
"start": "2017-02-28",
"end": "2017-03-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:43.600 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:44.234 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:48.315+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:48.315+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:44.234 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA13",
"display": "Pegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-03-23",
"end": "2017-03-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:44.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:44.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QyTnp66yo0qNxvXZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14840/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14840/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:44.819 [print] {
"resourceType": "MedicationAdministration",
"id": "14840",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:49.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA13",
"display": "Pegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-03-23",
"end": "2017-03-23"
}
}
> *
print COOKIES
10:23:44.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:44.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:44.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QyTnp66yo0qNxvXZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14840/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14840/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:44.819 [print] {
"resourceType": "MedicationAdministration",
"id": "14840",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:49.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA13",
"display": "Pegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-03-23",
"end": "2017-03-23"
}
}
> *
print COOKIES
10:23:44.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:45.440 [print] {
"resourceType": "MedicationAdministration",
"id": "14840",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:49.530+02:00",
"source": "#QyTnp66yo0qNxvXZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA13",
"display": "Pegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-03-23",
"end": "2017-03-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:46.057 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:47.667 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:50.767+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:50.767+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:47.667 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC02",
"display": "Basiliximab"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-05-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:48.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:48.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CLlDdg3bQnFPIcOr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14841/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14841/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:48.493 [print] {
"resourceType": "MedicationAdministration",
"id": "14841",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:52.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC02",
"display": "Basiliximab"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-05-11"
}
}
> *
print COOKIES
10:23:48.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:48.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:48.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CLlDdg3bQnFPIcOr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14841/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14841/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:48.493 [print] {
"resourceType": "MedicationAdministration",
"id": "14841",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:52.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC02",
"display": "Basiliximab"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-05-11"
}
}
> *
print COOKIES
10:23:48.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:49.098 [print] {
"resourceType": "MedicationAdministration",
"id": "14841",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:52.998+02:00",
"source": "#CLlDdg3bQnFPIcOr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC02",
"display": "Basiliximab"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-05-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:49.939 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:50.595 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:54.653+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:54.653+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:50.611 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD03",
"display": "Voclosporina"
}
]
},
"effectivePeriod": {
"start": "2017-10-09",
"end": "2017-07-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:51.210 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:51.210 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z5FVTsFV3FZsUYYO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14842/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14842/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:51.210 [print] {
"resourceType": "MedicationAdministration",
"id": "14842",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:55.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD03",
"display": "Voclosporina"
}
]
},
"effectivePeriod": {
"start": "2017-10-09",
"end": "2017-07-25"
}
}
> *
print COOKIES
10:23:51.210 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:51.226 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:51.226 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z5FVTsFV3FZsUYYO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14842/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14842/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:51.226 [print] {
"resourceType": "MedicationAdministration",
"id": "14842",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:55.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD03",
"display": "Voclosporina"
}
]
},
"effectivePeriod": {
"start": "2017-10-09",
"end": "2017-07-25"
}
}
> *
print COOKIES
10:23:51.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:51.835 [print] {
"resourceType": "MedicationAdministration",
"id": "14842",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:55.933+02:00",
"source": "#Z5FVTsFV3FZsUYYO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD03",
"display": "Voclosporina"
}
]
},
"effectivePeriod": {
"start": "2017-10-09",
"end": "2017-07-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:52.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:53.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:57.174+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:57.174+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:53.111 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC07",
"display": "Bevacizumab"
}
]
},
"effectivePeriod": {
"start": "2017-11-22",
"end": "2017-10-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:53.754 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:53.754 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2R3Nr00nSvw1XrnO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14843/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14843/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:53.754 [print] {
"resourceType": "MedicationAdministration",
"id": "14843",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:58.466+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC07",
"display": "Bevacizumab"
}
]
},
"effectivePeriod": {
"start": "2017-11-22",
"end": "2017-10-25"
}
}
> *
print COOKIES
10:23:53.754 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:53.754 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:53.754 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2R3Nr00nSvw1XrnO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14843/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:23:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14843/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:23:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:53.754 [print] {
"resourceType": "MedicationAdministration",
"id": "14843",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:58.466+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC07",
"display": "Bevacizumab"
}
]
},
"effectivePeriod": {
"start": "2017-11-22",
"end": "2017-10-25"
}
}
> *
print COOKIES
10:23:53.754 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:54.570 [print] {
"resourceType": "MedicationAdministration",
"id": "14843",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:23:58.466+02:00",
"source": "#2R3Nr00nSvw1XrnO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC07",
"display": "Bevacizumab"
}
]
},
"effectivePeriod": {
"start": "2017-11-22",
"end": "2017-10-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:55.207 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:55.824 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:23:59.909+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:23:59.909+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:55.824 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD02",
"display": "Tacrolimus"
}
]
},
"effectivePeriod": {
"start": "2017-11-27",
"end": "2017-11-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:56.417 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:56.417 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oGiDG04caqpWiaEX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14844/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14844/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:56.417 [print] {
"resourceType": "MedicationAdministration",
"id": "14844",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:01.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD02",
"display": "Tacrolimus"
}
]
},
"effectivePeriod": {
"start": "2017-11-27",
"end": "2017-11-27"
}
}
> *
print COOKIES
10:23:56.417 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:56.417 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:56.417 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oGiDG04caqpWiaEX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14844/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14844/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:56.417 [print] {
"resourceType": "MedicationAdministration",
"id": "14844",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:01.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD02",
"display": "Tacrolimus"
}
]
},
"effectivePeriod": {
"start": "2017-11-27",
"end": "2017-11-27"
}
}
> *
print COOKIES
10:23:56.417 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:57.060 [print] {
"resourceType": "MedicationAdministration",
"id": "14844",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:01.131+02:00",
"source": "#oGiDG04caqpWiaEX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD02",
"display": "Tacrolimus"
}
]
},
"effectivePeriod": {
"start": "2017-11-27",
"end": "2017-11-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:23:57.689 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:23:58.282 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:02.395+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:02.395+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:23:58.284 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC03",
"display": "Anakinra"
}
]
},
"effectivePeriod": {
"start": "2013-01-16",
"end": "2013-03-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:58.941 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:58.941 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IYm2qir2TqfLLZKj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14845/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14845/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:58.941 [print] {
"resourceType": "MedicationAdministration",
"id": "14845",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:03.638+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC03",
"display": "Anakinra"
}
]
},
"effectivePeriod": {
"start": "2013-01-16",
"end": "2013-03-28"
}
}
> *
print COOKIES
10:23:58.941 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:23:58.943 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:23:58.943 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IYm2qir2TqfLLZKj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14845/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14845/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:23:58.943 [print] {
"resourceType": "MedicationAdministration",
"id": "14845",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:03.638+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC03",
"display": "Anakinra"
}
]
},
"effectivePeriod": {
"start": "2013-01-16",
"end": "2013-03-28"
}
}
> *
print COOKIES
10:23:58.943 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:23:59.553 [print] {
"resourceType": "MedicationAdministration",
"id": "14845",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:03.638+02:00",
"source": "#IYm2qir2TqfLLZKj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC03",
"display": "Anakinra"
}
]
},
"effectivePeriod": {
"start": "2013-01-16",
"end": "2013-03-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:00.148 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:00.766 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:04.858+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:04.858+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:00.768 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX11",
"display": "Tasonermina"
}
]
},
"effectivePeriod": {
"start": "2013-02-25",
"end": "2013-04-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:01.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:01.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oalOC6Zec50dxrdW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14846/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14846/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:01.382 [print] {
"resourceType": "MedicationAdministration",
"id": "14846",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:06.094+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX11",
"display": "Tasonermina"
}
]
},
"effectivePeriod": {
"start": "2013-02-25",
"end": "2013-04-05"
}
}
> *
print COOKIES
10:24:01.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:01.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:01.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oalOC6Zec50dxrdW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14846/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14846/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:01.382 [print] {
"resourceType": "MedicationAdministration",
"id": "14846",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:06.094+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX11",
"display": "Tasonermina"
}
]
},
"effectivePeriod": {
"start": "2013-02-25",
"end": "2013-04-05"
}
}
> *
print COOKIES
10:24:01.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:01.984 [print] {
"resourceType": "MedicationAdministration",
"id": "14846",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:06.094+02:00",
"source": "#oalOC6Zec50dxrdW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX11",
"display": "Tasonermina"
}
]
},
"effectivePeriod": {
"start": "2013-02-25",
"end": "2013-04-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:02.638 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 28ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 28ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:03.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:07.330+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:07.330+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:03.257 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD05",
"display": "Temoporfina"
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2013-05-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:03.834 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:03.834 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mBP6qDczRPw28PgN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14847/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14847/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:03.834 [print] {
"resourceType": "MedicationAdministration",
"id": "14847",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:08.538+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD05",
"display": "Temoporfina"
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2013-05-30"
}
}
> *
print COOKIES
10:24:03.834 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:03.834 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:03.834 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mBP6qDczRPw28PgN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14847/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14847/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:03.834 [print] {
"resourceType": "MedicationAdministration",
"id": "14847",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:08.538+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD05",
"display": "Temoporfina"
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2013-05-30"
}
}
> *
print COOKIES
10:24:03.834 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:04.403 [print] {
"resourceType": "MedicationAdministration",
"id": "14847",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:08.538+02:00",
"source": "#mBP6qDczRPw28PgN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD05",
"display": "Temoporfina"
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2013-05-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:05.027 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:05.663 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:09.746+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:09.746+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:05.663 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX33",
"display": "Celecoxib"
}
]
},
"effectivePeriod": {
"start": "2013-12-04",
"end": "2013-10-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:06.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:06.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mNejN5tLfzupTOHX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14848/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14848/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:06.290 [print] {
"resourceType": "MedicationAdministration",
"id": "14848",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:10.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX33",
"display": "Celecoxib"
}
]
},
"effectivePeriod": {
"start": "2013-12-04",
"end": "2013-10-28"
}
}
> *
print COOKIES
10:24:06.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:06.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:06.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mNejN5tLfzupTOHX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14848/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14848/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:06.290 [print] {
"resourceType": "MedicationAdministration",
"id": "14848",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:10.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX33",
"display": "Celecoxib"
}
]
},
"effectivePeriod": {
"start": "2013-12-04",
"end": "2013-10-28"
}
}
> *
print COOKIES
10:24:06.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:06.897 [print] {
"resourceType": "MedicationAdministration",
"id": "14848",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:10.996+02:00",
"source": "#mNejN5tLfzupTOHX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX33",
"display": "Celecoxib"
}
]
},
"effectivePeriod": {
"start": "2013-12-04",
"end": "2013-10-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:07.518 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:08.127 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:12.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:12.227+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:08.127 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB01",
"display": "Interferone alfa natural"
}
]
},
"effectivePeriod": {
"start": "2014-03-25",
"end": "2014-06-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:08.768 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:08.768 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MLUHFg3OMGQbGAqf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14849/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14849/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:08.768 [print] {
"resourceType": "MedicationAdministration",
"id": "14849",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:13.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB01",
"display": "Interferone alfa natural"
}
]
},
"effectivePeriod": {
"start": "2014-03-25",
"end": "2014-06-13"
}
}
> *
print COOKIES
10:24:08.768 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:08.768 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:08.768 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MLUHFg3OMGQbGAqf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14849/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14849/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:08.768 [print] {
"resourceType": "MedicationAdministration",
"id": "14849",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:13.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB01",
"display": "Interferone alfa natural"
}
]
},
"effectivePeriod": {
"start": "2014-03-25",
"end": "2014-06-13"
}
}
> *
print COOKIES
10:24:08.768 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:09.358 [print] {
"resourceType": "MedicationAdministration",
"id": "14849",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:13.488+02:00",
"source": "#MLUHFg3OMGQbGAqf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB01",
"display": "Interferone alfa natural"
}
]
},
"effectivePeriod": {
"start": "2014-03-25",
"end": "2014-06-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:09.923 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:10.524 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:14.640+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:14.640+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:10.524 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA10",
"display": "Lenograstim"
}
]
},
"effectivePeriod": {
"start": "2014-06-24",
"end": "2014-07-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:11.149 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:11.149 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9nVCyCaMvyIIdQcE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14850/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14850/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:11.149 [print] {
"resourceType": "MedicationAdministration",
"id": "14850",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:15.859+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA10",
"display": "Lenograstim"
}
]
},
"effectivePeriod": {
"start": "2014-06-24",
"end": "2014-07-11"
}
}
> *
print COOKIES
10:24:11.149 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:11.149 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:11.149 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9nVCyCaMvyIIdQcE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14850/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14850/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:11.149 [print] {
"resourceType": "MedicationAdministration",
"id": "14850",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:15.859+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA10",
"display": "Lenograstim"
}
]
},
"effectivePeriod": {
"start": "2014-06-24",
"end": "2014-07-11"
}
}
> *
print COOKIES
10:24:11.149 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:11.772 [print] {
"resourceType": "MedicationAdministration",
"id": "14850",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:15.859+02:00",
"source": "#9nVCyCaMvyIIdQcE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA10",
"display": "Lenograstim"
}
]
},
"effectivePeriod": {
"start": "2014-06-24",
"end": "2014-07-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:12.352 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:12.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:17.074+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:17.074+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:12.938 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA21",
"display": "Efalizumab"
}
]
},
"effectivePeriod": {
"start": "2014-07-16",
"end": "2014-09-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:13.571 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:13.571 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XpiEtajIGbbdCXMU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14851/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14851/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:13.571 [print] {
"resourceType": "MedicationAdministration",
"id": "14851",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:18.283+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA21",
"display": "Efalizumab"
}
]
},
"effectivePeriod": {
"start": "2014-07-16",
"end": "2014-09-25"
}
}
> *
print COOKIES
10:24:13.571 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:13.571 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:13.571 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XpiEtajIGbbdCXMU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14851/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14851/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:13.571 [print] {
"resourceType": "MedicationAdministration",
"id": "14851",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:18.283+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA21",
"display": "Efalizumab"
}
]
},
"effectivePeriod": {
"start": "2014-07-16",
"end": "2014-09-25"
}
}
> *
print COOKIES
10:24:13.571 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:14.211 [print] {
"resourceType": "MedicationAdministration",
"id": "14851",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:18.283+02:00",
"source": "#XpiEtajIGbbdCXMU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA21",
"display": "Efalizumab"
}
]
},
"effectivePeriod": {
"start": "2014-07-16",
"end": "2014-09-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:14.831 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:15.433 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:19.550+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:19.550+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:15.433 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG03",
"display": "Anastrozolo"
}
]
},
"effectivePeriod": {
"start": "2014-08-27",
"end": "2015-01-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:16.019 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:16.019 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qIEruISapL0lZuUB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14852/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14852/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:16.019 [print] {
"resourceType": "MedicationAdministration",
"id": "14852",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:20.730+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG03",
"display": "Anastrozolo"
}
]
},
"effectivePeriod": {
"start": "2014-08-27",
"end": "2015-01-28"
}
}
> *
print COOKIES
10:24:16.019 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:16.019 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:16.019 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qIEruISapL0lZuUB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14852/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14852/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:16.019 [print] {
"resourceType": "MedicationAdministration",
"id": "14852",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:20.730+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG03",
"display": "Anastrozolo"
}
]
},
"effectivePeriod": {
"start": "2014-08-27",
"end": "2015-01-28"
}
}
> *
print COOKIES
10:24:16.019 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:16.584 [print] {
"resourceType": "MedicationAdministration",
"id": "14852",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:20.730+02:00",
"source": "#qIEruISapL0lZuUB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG03",
"display": "Anastrozolo"
}
]
},
"effectivePeriod": {
"start": "2014-08-27",
"end": "2015-01-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:17.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:17.790 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:21.900+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:21.900+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:17.790 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA25",
"display": "Eculizumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-11",
"end": "2015-03-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:18.392 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:18.392 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gVin1e446UWDzLK0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14853/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14853/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:18.392 [print] {
"resourceType": "MedicationAdministration",
"id": "14853",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:23.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA25",
"display": "Eculizumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-11",
"end": "2015-03-31"
}
}
> *
print COOKIES
10:24:18.392 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:18.392 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:18.392 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gVin1e446UWDzLK0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14853/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14853/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:18.392 [print] {
"resourceType": "MedicationAdministration",
"id": "14853",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:23.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA25",
"display": "Eculizumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-11",
"end": "2015-03-31"
}
}
> *
print COOKIES
10:24:18.392 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:19.032 [print] {
"resourceType": "MedicationAdministration",
"id": "14853",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:23.104+02:00",
"source": "#gVin1e446UWDzLK0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA25",
"display": "Eculizumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-11",
"end": "2015-03-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:19.981 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:20.552 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:24.691+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:24.691+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:20.567 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC08",
"display": "Canakinumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-29",
"end": "2015-04-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:21.137 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:21.137 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"enZOPOyxURux2r1F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14854/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14854/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:21.137 [print] {
"resourceType": "MedicationAdministration",
"id": "14854",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:25.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC08",
"display": "Canakinumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-29",
"end": "2015-04-17"
}
}
> *
print COOKIES
10:24:21.137 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:21.137 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:21.137 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"enZOPOyxURux2r1F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14854/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14854/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:21.137 [print] {
"resourceType": "MedicationAdministration",
"id": "14854",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:25.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC08",
"display": "Canakinumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-29",
"end": "2015-04-17"
}
}
> *
print COOKIES
10:24:21.137 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:21.733 [print] {
"resourceType": "MedicationAdministration",
"id": "14854",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:25.853+02:00",
"source": "#enZOPOyxURux2r1F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC08",
"display": "Canakinumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-29",
"end": "2015-04-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:22.387 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:22.974 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:27.097+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:27.097+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:22.974 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC04",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-12-10",
"end": "2015-06-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:23.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:23.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CjHhjmf74J5cqsuu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14855/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14855/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:23.606 [print] {
"resourceType": "MedicationAdministration",
"id": "14855",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:28.317+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC04",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-12-10",
"end": "2015-06-09"
}
}
> *
print COOKIES
10:24:23.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:23.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:23.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CjHhjmf74J5cqsuu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14855/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14855/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:23.606 [print] {
"resourceType": "MedicationAdministration",
"id": "14855",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:28.317+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC04",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-12-10",
"end": "2015-06-09"
}
}
> *
print COOKIES
10:24:23.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:24.207 [print] {
"resourceType": "MedicationAdministration",
"id": "14855",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:28.317+02:00",
"source": "#CjHhjmf74J5cqsuu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC04",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-12-10",
"end": "2015-06-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:24.846 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:25.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:29.552+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:29.552+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:25.479 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD05",
"display": "Fotemustina"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2015-08-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:26.087 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:26.087 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OKAkKBOskPUKSJ9R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14856/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14856/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:26.087 [print] {
"resourceType": "MedicationAdministration",
"id": "14856",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:30.810+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD05",
"display": "Fotemustina"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2015-08-17"
}
}
> *
print COOKIES
10:24:26.087 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:26.102 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:26.102 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OKAkKBOskPUKSJ9R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14856/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14856/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:26.102 [print] {
"resourceType": "MedicationAdministration",
"id": "14856",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:30.810+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD05",
"display": "Fotemustina"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2015-08-17"
}
}
> *
print COOKIES
10:24:26.102 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:26.704 [print] {
"resourceType": "MedicationAdministration",
"id": "14856",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:30.810+02:00",
"source": "#OKAkKBOskPUKSJ9R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD05",
"display": "Fotemustina"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2015-08-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:27.337 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:27.924 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:32.037+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:32.037+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:27.924 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD02",
"display": "Docetaxel"
}
]
},
"effectivePeriod": {
"start": "2015-01-07",
"end": "2015-10-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:28.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:28.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UYOsFwTwEiMXqBkB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14857/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14857/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:28.493 [print] {
"resourceType": "MedicationAdministration",
"id": "14857",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:33.214+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD02",
"display": "Docetaxel"
}
]
},
"effectivePeriod": {
"start": "2015-01-07",
"end": "2015-10-08"
}
}
> *
print COOKIES
10:24:28.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:28.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:28.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UYOsFwTwEiMXqBkB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14857/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14857/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:28.493 [print] {
"resourceType": "MedicationAdministration",
"id": "14857",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:33.214+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD02",
"display": "Docetaxel"
}
]
},
"effectivePeriod": {
"start": "2015-01-07",
"end": "2015-10-08"
}
}
> *
print COOKIES
10:24:28.509 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:29.064 [print] {
"resourceType": "MedicationAdministration",
"id": "14857",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:33.214+02:00",
"source": "#UYOsFwTwEiMXqBkB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD02",
"display": "Docetaxel"
}
]
},
"effectivePeriod": {
"start": "2015-01-07",
"end": "2015-10-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:29.712 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:30.345 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:34.430+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:34.430+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:30.345 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX14",
"display": "Tretinoin"
}
]
},
"effectivePeriod": {
"start": "2015-03-09",
"end": "2016-02-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:30.969 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:30.969 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OT2X1dgUZWNLVSy4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14858/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14858/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:30.969 [print] {
"resourceType": "MedicationAdministration",
"id": "14858",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:35.675+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX14",
"display": "Tretinoin"
}
]
},
"effectivePeriod": {
"start": "2015-03-09",
"end": "2016-02-15"
}
}
> *
print COOKIES
10:24:30.969 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:30.969 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:30.969 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OT2X1dgUZWNLVSy4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14858/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14858/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:30.969 [print] {
"resourceType": "MedicationAdministration",
"id": "14858",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:35.675+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX14",
"display": "Tretinoin"
}
]
},
"effectivePeriod": {
"start": "2015-03-09",
"end": "2016-02-15"
}
}
> *
print COOKIES
10:24:30.969 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:31.787 [print] {
"resourceType": "MedicationAdministration",
"id": "14858",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:35.675+02:00",
"source": "#OT2X1dgUZWNLVSy4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX14",
"display": "Tretinoin"
}
]
},
"effectivePeriod": {
"start": "2015-03-09",
"end": "2016-02-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:32.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:32.992 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:37.069+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:37.069+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:32.992 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC04",
"display": "Ixabepilone"
}
]
},
"effectivePeriod": {
"start": "2015-03-30",
"end": "2016-06-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:33.640 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:33.640 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VZdQDFvbwxcclIXw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14859/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14859/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:33.640 [print] {
"resourceType": "MedicationAdministration",
"id": "14859",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:38.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC04",
"display": "Ixabepilone"
}
]
},
"effectivePeriod": {
"start": "2015-03-30",
"end": "2016-06-17"
}
}
> *
print COOKIES
10:24:33.640 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:33.640 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:33.640 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VZdQDFvbwxcclIXw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14859/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14859/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:33.640 [print] {
"resourceType": "MedicationAdministration",
"id": "14859",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:38.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC04",
"display": "Ixabepilone"
}
]
},
"effectivePeriod": {
"start": "2015-03-30",
"end": "2016-06-17"
}
}
> *
print COOKIES
10:24:33.640 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:34.240 [print] {
"resourceType": "MedicationAdministration",
"id": "14859",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:38.337+02:00",
"source": "#VZdQDFvbwxcclIXw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC04",
"display": "Ixabepilone"
}
]
},
"effectivePeriod": {
"start": "2015-03-30",
"end": "2016-06-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:34.857 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:35.481 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:39.576+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:39.576+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:35.497 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX02",
"display": "Pipobromam"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2016-06-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:36.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:36.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mJTzeqN7aMMmbFtG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14860/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14860/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:36.117 [print] {
"resourceType": "MedicationAdministration",
"id": "14860",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:40.832+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX02",
"display": "Pipobromam"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2016-06-28"
}
}
> *
print COOKIES
10:24:36.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:36.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:36.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mJTzeqN7aMMmbFtG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14860/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14860/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:36.117 [print] {
"resourceType": "MedicationAdministration",
"id": "14860",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:40.832+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX02",
"display": "Pipobromam"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2016-06-28"
}
}
> *
print COOKIES
10:24:36.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:36.739 [print] {
"resourceType": "MedicationAdministration",
"id": "14860",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:40.832+02:00",
"source": "#mJTzeqN7aMMmbFtG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX02",
"display": "Pipobromam"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2016-06-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:37.384 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:47.708 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:42.086+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:42.086+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:47.708 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE23",
"display": "Dabrafenib"
}
]
},
"effectivePeriod": {
"start": "2016-03-31",
"end": "2016-07-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:48.295 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:48.295 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ew42ZMTJPoFILRgU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14861/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14861/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:48.295 [print] {
"resourceType": "MedicationAdministration",
"id": "14861",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:53.002+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE23",
"display": "Dabrafenib"
}
]
},
"effectivePeriod": {
"start": "2016-03-31",
"end": "2016-07-18"
}
}
> *
print COOKIES
10:24:48.295 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:48.295 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:48.295 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ew42ZMTJPoFILRgU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14861/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14861/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:48.295 [print] {
"resourceType": "MedicationAdministration",
"id": "14861",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:53.002+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE23",
"display": "Dabrafenib"
}
]
},
"effectivePeriod": {
"start": "2016-03-31",
"end": "2016-07-18"
}
}
> *
print COOKIES
10:24:48.295 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:49.258 [print] {
"resourceType": "MedicationAdministration",
"id": "14861",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:53.002+02:00",
"source": "#ew42ZMTJPoFILRgU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE23",
"display": "Dabrafenib"
}
]
},
"effectivePeriod": {
"start": "2016-03-31",
"end": "2016-07-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:49.862 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:50.726 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:54.579+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:54.579+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:50.726 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX16",
"display": "Mitoguazone"
}
]
},
"effectivePeriod": {
"start": "2016-05-20",
"end": "2016-08-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:51.340 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:51.340 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kSD5RHeEPivNNIoY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14862/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14862/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:51.340 [print] {
"resourceType": "MedicationAdministration",
"id": "14862",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:56.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX16",
"display": "Mitoguazone"
}
]
},
"effectivePeriod": {
"start": "2016-05-20",
"end": "2016-08-31"
}
}
> *
print COOKIES
10:24:51.340 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:51.340 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:51.340 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kSD5RHeEPivNNIoY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14862/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14862/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:51.340 [print] {
"resourceType": "MedicationAdministration",
"id": "14862",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:56.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX16",
"display": "Mitoguazone"
}
]
},
"effectivePeriod": {
"start": "2016-05-20",
"end": "2016-08-31"
}
}
> *
print COOKIES
10:24:51.340 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:51.960 [print] {
"resourceType": "MedicationAdministration",
"id": "14862",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:56.060+02:00",
"source": "#kSD5RHeEPivNNIoY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX16",
"display": "Mitoguazone"
}
]
},
"effectivePeriod": {
"start": "2016-05-20",
"end": "2016-08-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:52.619 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:53.190 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:57.324+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:57.324+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:53.205 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC13",
"display": "Pertuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-07-29",
"end": "2016-09-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:53.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:53.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B86NK4nunPAfYuNc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14863/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14863/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:53.784 [print] {
"resourceType": "MedicationAdministration",
"id": "14863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:58.498+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC13",
"display": "Pertuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-07-29",
"end": "2016-09-06"
}
}
> *
print COOKIES
10:24:53.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:53.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:53.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B86NK4nunPAfYuNc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14863/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:24:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14863/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:24:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:53.784 [print] {
"resourceType": "MedicationAdministration",
"id": "14863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:58.498+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC13",
"display": "Pertuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-07-29",
"end": "2016-09-06"
}
}
> *
print COOKIES
10:24:53.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:54.393 [print] {
"resourceType": "MedicationAdministration",
"id": "14863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:24:58.498+02:00",
"source": "#B86NK4nunPAfYuNc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC13",
"display": "Pertuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-07-29",
"end": "2016-09-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:55.025 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:55.643 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:24:59.740+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:24:59.740+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:55.643 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC01",
"display": "Aldesleuchina"
}
]
},
"effectivePeriod": {
"start": "2016-08-03",
"end": "2016-10-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:56.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:56.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yC1jICd8nLLYpLhu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14864/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14864/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:56.229 [print] {
"resourceType": "MedicationAdministration",
"id": "14864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:00.945+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC01",
"display": "Aldesleuchina"
}
]
},
"effectivePeriod": {
"start": "2016-08-03",
"end": "2016-10-26"
}
}
> *
print COOKIES
10:24:56.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:56.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:56.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yC1jICd8nLLYpLhu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14864/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14864/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:56.229 [print] {
"resourceType": "MedicationAdministration",
"id": "14864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:00.945+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC01",
"display": "Aldesleuchina"
}
]
},
"effectivePeriod": {
"start": "2016-08-03",
"end": "2016-10-26"
}
}
> *
print COOKIES
10:24:56.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:57.250 [print] {
"resourceType": "MedicationAdministration",
"id": "14864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:00.945+02:00",
"source": "#yC1jICd8nLLYpLhu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC01",
"display": "Aldesleuchina"
}
]
},
"effectivePeriod": {
"start": "2016-08-03",
"end": "2016-10-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:24:57.860 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:24:58.497 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:02.559+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:02.559+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:24:58.497 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE04",
"display": "Triptorelina "
}
]
},
"effectivePeriod": {
"start": "2016-10-13",
"end": "2016-12-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:59.125 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:59.125 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R9Ez623DMondbdHO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14865/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14865/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:59.125 [print] {
"resourceType": "MedicationAdministration",
"id": "14865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:03.828+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE04",
"display": "Triptorelina "
}
]
},
"effectivePeriod": {
"start": "2016-10-13",
"end": "2016-12-27"
}
}
> *
print COOKIES
10:24:59.125 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:24:59.125 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:24:59.125 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R9Ez623DMondbdHO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14865/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14865/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:24:59.125 [print] {
"resourceType": "MedicationAdministration",
"id": "14865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:03.828+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE04",
"display": "Triptorelina "
}
]
},
"effectivePeriod": {
"start": "2016-10-13",
"end": "2016-12-27"
}
}
> *
print COOKIES
10:24:59.125 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:24:59.758 [print] {
"resourceType": "MedicationAdministration",
"id": "14865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:03.828+02:00",
"source": "#R9Ez623DMondbdHO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE04",
"display": "Triptorelina "
}
]
},
"effectivePeriod": {
"start": "2016-10-13",
"end": "2016-12-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:00.350 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:00.937 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:05.071+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:05.071+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:00.937 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA27",
"display": "Fingolimod "
}
]
},
"effectivePeriod": {
"start": "2017-01-09",
"end": "2017-01-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:01.589 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:01.589 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xpKkD2PiM27lG3Mj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14866/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14866/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:01.589 [print] {
"resourceType": "MedicationAdministration",
"id": "14866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:06.291+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA27",
"display": "Fingolimod "
}
]
},
"effectivePeriod": {
"start": "2017-01-09",
"end": "2017-01-18"
}
}
> *
print COOKIES
10:25:01.589 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:01.589 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:01.589 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xpKkD2PiM27lG3Mj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14866/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14866/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:01.589 [print] {
"resourceType": "MedicationAdministration",
"id": "14866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:06.291+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA27",
"display": "Fingolimod "
}
]
},
"effectivePeriod": {
"start": "2017-01-09",
"end": "2017-01-18"
}
}
> *
print COOKIES
10:25:01.589 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:02.167 [print] {
"resourceType": "MedicationAdministration",
"id": "14866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:06.291+02:00",
"source": "#xpKkD2PiM27lG3Mj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA27",
"display": "Fingolimod "
}
]
},
"effectivePeriod": {
"start": "2017-01-09",
"end": "2017-01-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:02.768 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:03.389 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:07.474+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:07.474+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:03.389 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX12",
"display": "Melanoma vaccino"
}
]
},
"effectivePeriod": {
"start": "2017-01-24",
"end": "2017-03-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:03.959 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:03.959 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V09R7LblkDrZLPm7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14867/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14867/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:03.959 [print] {
"resourceType": "MedicationAdministration",
"id": "14867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:08.675+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX12",
"display": "Melanoma vaccino"
}
]
},
"effectivePeriod": {
"start": "2017-01-24",
"end": "2017-03-30"
}
}
> *
print COOKIES
10:25:03.959 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:03.959 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:03.959 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V09R7LblkDrZLPm7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14867/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14867/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:03.959 [print] {
"resourceType": "MedicationAdministration",
"id": "14867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:08.675+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX12",
"display": "Melanoma vaccino"
}
]
},
"effectivePeriod": {
"start": "2017-01-24",
"end": "2017-03-30"
}
}
> *
print COOKIES
10:25:03.959 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:04.559 [print] {
"resourceType": "MedicationAdministration",
"id": "14867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:08.675+02:00",
"source": "#V09R7LblkDrZLPm7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX12",
"display": "Melanoma vaccino"
}
]
},
"effectivePeriod": {
"start": "2017-01-24",
"end": "2017-03-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:05.138 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:05.723 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:09.856+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:09.856+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:05.738 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA02",
"display": "Toremifene "
}
]
},
"effectivePeriod": {
"start": "2017-06-08",
"end": "2017-10-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:06.340 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:06.340 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qE3IHj8cRrGignry"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14868/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14868/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:06.340 [print] {
"resourceType": "MedicationAdministration",
"id": "14868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:11.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA02",
"display": "Toremifene "
}
]
},
"effectivePeriod": {
"start": "2017-06-08",
"end": "2017-10-11"
}
}
> *
print COOKIES
10:25:06.340 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:06.340 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:06.340 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qE3IHj8cRrGignry"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14868/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14868/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:06.340 [print] {
"resourceType": "MedicationAdministration",
"id": "14868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:11.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA02",
"display": "Toremifene "
}
]
},
"effectivePeriod": {
"start": "2017-06-08",
"end": "2017-10-11"
}
}
> *
print COOKIES
10:25:06.340 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:06.957 [print] {
"resourceType": "MedicationAdministration",
"id": "14868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:11.047+02:00",
"source": "#qE3IHj8cRrGignry",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA02",
"display": "Toremifene "
}
]
},
"effectivePeriod": {
"start": "2017-06-08",
"end": "2017-10-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:07.797 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:08.654 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:12.502+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:12.502+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:08.669 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE27",
"display": "Ibrutinib"
}
]
},
"effectivePeriod": {
"start": "2017-07-19",
"end": "2017-12-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:09.276 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:09.276 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UfEr647HrjtQMSwc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14869/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14869/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:09.276 [print] {
"resourceType": "MedicationAdministration",
"id": "14869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:13.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE27",
"display": "Ibrutinib"
}
]
},
"effectivePeriod": {
"start": "2017-07-19",
"end": "2017-12-01"
}
}
> *
print COOKIES
10:25:09.276 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:09.276 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:09.276 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UfEr647HrjtQMSwc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14869/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14869/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:09.276 [print] {
"resourceType": "MedicationAdministration",
"id": "14869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:13.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE27",
"display": "Ibrutinib"
}
]
},
"effectivePeriod": {
"start": "2017-07-19",
"end": "2017-12-01"
}
}
> *
print COOKIES
10:25:09.276 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:09.861 [print] {
"resourceType": "MedicationAdministration",
"id": "14869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:13.970+02:00",
"source": "#UfEr647HrjtQMSwc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE27",
"display": "Ibrutinib"
}
]
},
"effectivePeriod": {
"start": "2017-07-19",
"end": "2017-12-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:10.463 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:11.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:15.180+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:15.180+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:11.053 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC02",
"display": "Plicamicina"
}
]
},
"effectivePeriod": {
"start": "2012-09-13",
"end": "2013-03-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:11.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:11.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xaFN57f1oTxfjsho"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14870/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14870/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:11.654 [print] {
"resourceType": "MedicationAdministration",
"id": "14870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:16.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC02",
"display": "Plicamicina"
}
]
},
"effectivePeriod": {
"start": "2012-09-13",
"end": "2013-03-14"
}
}
> *
print COOKIES
10:25:11.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:11.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:11.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xaFN57f1oTxfjsho"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14870/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14870/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:11.654 [print] {
"resourceType": "MedicationAdministration",
"id": "14870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:16.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC02",
"display": "Plicamicina"
}
]
},
"effectivePeriod": {
"start": "2012-09-13",
"end": "2013-03-14"
}
}
> *
print COOKIES
10:25:11.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:12.309 [print] {
"resourceType": "MedicationAdministration",
"id": "14870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:16.371+02:00",
"source": "#xaFN57f1oTxfjsho",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC02",
"display": "Plicamicina"
}
]
},
"effectivePeriod": {
"start": "2012-09-13",
"end": "2013-03-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:12.895 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:13.459 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:17.607+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:17.607+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:13.459 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD03",
"display": "Paclitaxel poliglumex"
}
]
},
"effectivePeriod": {
"start": "2012-09-27",
"end": "2013-04-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:14.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:14.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Yet2przCjUMlwVpl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14871/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14871/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:14.099 [print] {
"resourceType": "MedicationAdministration",
"id": "14871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:18.814+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD03",
"display": "Paclitaxel poliglumex"
}
]
},
"effectivePeriod": {
"start": "2012-09-27",
"end": "2013-04-24"
}
}
> *
print COOKIES
10:25:14.099 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:14.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:14.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Yet2przCjUMlwVpl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14871/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14871/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:14.099 [print] {
"resourceType": "MedicationAdministration",
"id": "14871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:18.814+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD03",
"display": "Paclitaxel poliglumex"
}
]
},
"effectivePeriod": {
"start": "2012-09-27",
"end": "2013-04-24"
}
}
> *
print COOKIES
10:25:14.099 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:14.679 [print] {
"resourceType": "MedicationAdministration",
"id": "14871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:18.814+02:00",
"source": "#Yet2przCjUMlwVpl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD03",
"display": "Paclitaxel poliglumex"
}
]
},
"effectivePeriod": {
"start": "2012-09-27",
"end": "2013-04-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:15.318 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:16.188 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:20.026+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:20.026+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:16.188 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA02",
"display": "Clorambucile"
}
]
},
"effectivePeriod": {
"start": "2012-12-27",
"end": "2013-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:16.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:16.822 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GklJ5IMJ9L8pRToy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14872/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14872/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:16.822 [print] {
"resourceType": "MedicationAdministration",
"id": "14872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:21.535+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA02",
"display": "Clorambucile"
}
]
},
"effectivePeriod": {
"start": "2012-12-27",
"end": "2013-05-16"
}
}
> *
print COOKIES
10:25:16.822 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:16.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:16.822 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GklJ5IMJ9L8pRToy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14872/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14872/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:16.822 [print] {
"resourceType": "MedicationAdministration",
"id": "14872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:21.535+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA02",
"display": "Clorambucile"
}
]
},
"effectivePeriod": {
"start": "2012-12-27",
"end": "2013-05-16"
}
}
> *
print COOKIES
10:25:16.822 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:17.421 [print] {
"resourceType": "MedicationAdministration",
"id": "14872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:21.535+02:00",
"source": "#GklJ5IMJ9L8pRToy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA02",
"display": "Clorambucile"
}
]
},
"effectivePeriod": {
"start": "2012-12-27",
"end": "2013-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:18.067 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:18.742 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:22.787+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:22.787+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:18.742 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE33",
"display": "Palbociclib"
}
]
},
"effectivePeriod": {
"start": "2013-01-17",
"end": "2013-09-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:19.341 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:19.341 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hkaQZ37oLqs8T3QM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14873/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14873/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:19.341 [print] {
"resourceType": "MedicationAdministration",
"id": "14873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:24.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE33",
"display": "Palbociclib"
}
]
},
"effectivePeriod": {
"start": "2013-01-17",
"end": "2013-09-16"
}
}
> *
print COOKIES
10:25:19.341 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:19.347 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:19.347 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hkaQZ37oLqs8T3QM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14873/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14873/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:19.347 [print] {
"resourceType": "MedicationAdministration",
"id": "14873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:24.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE33",
"display": "Palbociclib"
}
]
},
"effectivePeriod": {
"start": "2013-01-17",
"end": "2013-09-16"
}
}
> *
print COOKIES
10:25:19.347 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:19.954 [print] {
"resourceType": "MedicationAdministration",
"id": "14873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:24.049+02:00",
"source": "#hkaQZ37oLqs8T3QM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE33",
"display": "Palbociclib"
}
]
},
"effectivePeriod": {
"start": "2013-01-17",
"end": "2013-09-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:20.792 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:21.424 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:25.498+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:25.498+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:21.424 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX01",
"display": "Amsacrina"
}
]
},
"effectivePeriod": {
"start": "2013-03-18",
"end": "2013-10-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:22.057 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:22.057 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TUjUrqcYavGWZHh3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14874/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14874/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:22.057 [print] {
"resourceType": "MedicationAdministration",
"id": "14874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:26.771+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX01",
"display": "Amsacrina"
}
]
},
"effectivePeriod": {
"start": "2013-03-18",
"end": "2013-10-28"
}
}
> *
print COOKIES
10:25:22.057 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:22.064 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:22.064 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TUjUrqcYavGWZHh3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14874/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14874/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:22.064 [print] {
"resourceType": "MedicationAdministration",
"id": "14874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:26.771+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX01",
"display": "Amsacrina"
}
]
},
"effectivePeriod": {
"start": "2013-03-18",
"end": "2013-10-28"
}
}
> *
print COOKIES
10:25:22.064 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:22.701 [print] {
"resourceType": "MedicationAdministration",
"id": "14874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:26.771+02:00",
"source": "#TUjUrqcYavGWZHh3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX01",
"display": "Amsacrina"
}
]
},
"effectivePeriod": {
"start": "2013-03-18",
"end": "2013-10-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:23.280 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:23.967 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:28.001+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:28.001+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:23.967 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX02",
"display": "Talidomida"
}
]
},
"effectivePeriod": {
"start": "2013-04-09",
"end": "2014-02-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:24.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:24.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7lYSXUPqOzZwlGI4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14875/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14875/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:24.608 [print] {
"resourceType": "MedicationAdministration",
"id": "14875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:29.313+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX02",
"display": "Talidomida"
}
]
},
"effectivePeriod": {
"start": "2013-04-09",
"end": "2014-02-05"
}
}
> *
print COOKIES
10:25:24.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:24.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:24.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7lYSXUPqOzZwlGI4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14875/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14875/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:24.608 [print] {
"resourceType": "MedicationAdministration",
"id": "14875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:29.313+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX02",
"display": "Talidomida"
}
]
},
"effectivePeriod": {
"start": "2013-04-09",
"end": "2014-02-05"
}
}
> *
print COOKIES
10:25:24.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:25.217 [print] {
"resourceType": "MedicationAdministration",
"id": "14875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:29.313+02:00",
"source": "#7lYSXUPqOzZwlGI4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX02",
"display": "Talidomida"
}
]
},
"effectivePeriod": {
"start": "2013-04-09",
"end": "2014-02-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:25.865 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:26.427 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:30.575+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:30.575+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:26.427 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD06",
"display": "Nimustina"
}
]
},
"effectivePeriod": {
"start": "2013-07-19",
"end": "2014-04-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:27.075 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:27.075 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wEqWjrHWu3O3iJQ0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14876/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:27.075 [print] {
"resourceType": "MedicationAdministration",
"id": "14876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:31.793+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD06",
"display": "Nimustina"
}
]
},
"effectivePeriod": {
"start": "2013-07-19",
"end": "2014-04-24"
}
}
> *
print COOKIES
10:25:27.075 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:27.075 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:27.075 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wEqWjrHWu3O3iJQ0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14876/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:27.075 [print] {
"resourceType": "MedicationAdministration",
"id": "14876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:31.793+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD06",
"display": "Nimustina"
}
]
},
"effectivePeriod": {
"start": "2013-07-19",
"end": "2014-04-24"
}
}
> *
print COOKIES
10:25:27.075 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:27.692 [print] {
"resourceType": "MedicationAdministration",
"id": "14876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:31.793+02:00",
"source": "#wEqWjrHWu3O3iJQ0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD06",
"display": "Nimustina"
}
]
},
"effectivePeriod": {
"start": "2013-07-19",
"end": "2014-04-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:28.294 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:28.887 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:32.993+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:32.993+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:28.887 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB05",
"display": "Certolizumab"
}
]
},
"effectivePeriod": {
"start": "2013-09-09",
"end": "2014-06-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:29.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:29.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WSOMGXlf0ynaYfPX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14877/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:29.540 [print] {
"resourceType": "MedicationAdministration",
"id": "14877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:34.242+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB05",
"display": "Certolizumab"
}
]
},
"effectivePeriod": {
"start": "2013-09-09",
"end": "2014-06-16"
}
}
> *
print COOKIES
10:25:29.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:29.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:29.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WSOMGXlf0ynaYfPX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14877/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:29.540 [print] {
"resourceType": "MedicationAdministration",
"id": "14877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:34.242+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB05",
"display": "Certolizumab"
}
]
},
"effectivePeriod": {
"start": "2013-09-09",
"end": "2014-06-16"
}
}
> *
print COOKIES
10:25:29.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:30.131 [print] {
"resourceType": "MedicationAdministration",
"id": "14877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:34.242+02:00",
"source": "#WSOMGXlf0ynaYfPX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB05",
"display": "Certolizumab"
}
]
},
"effectivePeriod": {
"start": "2013-09-09",
"end": "2014-06-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:30.721 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:31.349 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:35.432+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:35.432+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:31.349 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA04",
"display": "Immunoglobulina di coniglio antitimocitaria"
}
]
},
"effectivePeriod": {
"start": "2013-12-11",
"end": "2014-07-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:31.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"672"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:31.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bf0Kknu62A61b79B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14878/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:31.966 [print] {
"resourceType": "MedicationAdministration",
"id": "14878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:36.659+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA04",
"display": "Immunoglobulina di coniglio antitimocitaria"
}
]
},
"effectivePeriod": {
"start": "2013-12-11",
"end": "2014-07-02"
}
}
> *
print COOKIES
10:25:31.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:31.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"672"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:31.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bf0Kknu62A61b79B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14878/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:31.966 [print] {
"resourceType": "MedicationAdministration",
"id": "14878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:36.659+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA04",
"display": "Immunoglobulina di coniglio antitimocitaria"
}
]
},
"effectivePeriod": {
"start": "2013-12-11",
"end": "2014-07-02"
}
}
> *
print COOKIES
10:25:31.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:32.873 [print] {
"resourceType": "MedicationAdministration",
"id": "14878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:36.659+02:00",
"source": "#bf0Kknu62A61b79B",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA04",
"display": "Immunoglobulina di coniglio antitimocitaria"
}
]
},
"effectivePeriod": {
"start": "2013-12-11",
"end": "2014-07-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:33.490 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:34.138 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:38.201+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:38.201+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:34.138 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC15",
"display": "Obinutuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-02-07",
"end": "2014-11-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:34.762 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:34.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mhQ5qLvAaSgiLkRN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14879/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:34.762 [print] {
"resourceType": "MedicationAdministration",
"id": "14879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:39.472+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC15",
"display": "Obinutuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-02-07",
"end": "2014-11-17"
}
}
> *
print COOKIES
10:25:34.762 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:34.762 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:34.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mhQ5qLvAaSgiLkRN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14879/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:34.762 [print] {
"resourceType": "MedicationAdministration",
"id": "14879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:39.472+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC15",
"display": "Obinutuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-02-07",
"end": "2014-11-17"
}
}
> *
print COOKIES
10:25:34.762 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:35.395 [print] {
"resourceType": "MedicationAdministration",
"id": "14879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:39.472+02:00",
"source": "#mhQ5qLvAaSgiLkRN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC15",
"display": "Obinutuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-02-07",
"end": "2014-11-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:36.267 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:36.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:40.976+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:40.976+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:36.907 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE12",
"display": "Vandetanib"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2015-01-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:37.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:37.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AySQAhdjjYenYlsf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14880/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:37.546 [print] {
"resourceType": "MedicationAdministration",
"id": "14880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:42.255+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE12",
"display": "Vandetanib"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2015-01-05"
}
}
> *
print COOKIES
10:25:37.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:37.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:37.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AySQAhdjjYenYlsf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14880/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:37.546 [print] {
"resourceType": "MedicationAdministration",
"id": "14880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:42.255+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE12",
"display": "Vandetanib"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2015-01-05"
}
}
> *
print COOKIES
10:25:37.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:38.216 [print] {
"resourceType": "MedicationAdministration",
"id": "14880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:42.255+02:00",
"source": "#AySQAhdjjYenYlsf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE12",
"display": "Vandetanib"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2015-01-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:38.848 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:39.491 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:43.573+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:43.573+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:39.491 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA09",
"display": "Sargramostim"
}
]
},
"effectivePeriod": {
"start": "2014-03-04",
"end": "2015-01-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:40.143 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:40.143 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EiHFWMBk5DwtTMmf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14881/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:40.143 [print] {
"resourceType": "MedicationAdministration",
"id": "14881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:44.846+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA09",
"display": "Sargramostim"
}
]
},
"effectivePeriod": {
"start": "2014-03-04",
"end": "2015-01-28"
}
}
> *
print COOKIES
10:25:40.143 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:40.143 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:40.143 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EiHFWMBk5DwtTMmf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14881/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:40.143 [print] {
"resourceType": "MedicationAdministration",
"id": "14881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:44.846+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA09",
"display": "Sargramostim"
}
]
},
"effectivePeriod": {
"start": "2014-03-04",
"end": "2015-01-28"
}
}
> *
print COOKIES
10:25:40.143 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:40.740 [print] {
"resourceType": "MedicationAdministration",
"id": "14881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:44.846+02:00",
"source": "#EiHFWMBk5DwtTMmf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA09",
"display": "Sargramostim"
}
]
},
"effectivePeriod": {
"start": "2014-03-04",
"end": "2015-01-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:41.372 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:42.012 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:46.093+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:46.093+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:42.012 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA01",
"display": "Ciclofosfamide"
}
]
},
"effectivePeriod": {
"start": "2014-03-14",
"end": "2015-02-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:42.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:42.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kgd24Xlj8Q5GZfV6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14882/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:42.591 [print] {
"resourceType": "MedicationAdministration",
"id": "14882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:47.314+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA01",
"display": "Ciclofosfamide"
}
]
},
"effectivePeriod": {
"start": "2014-03-14",
"end": "2015-02-27"
}
}
> *
print COOKIES
10:25:42.591 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:42.607 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:42.607 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kgd24Xlj8Q5GZfV6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14882/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:42.607 [print] {
"resourceType": "MedicationAdministration",
"id": "14882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:47.314+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA01",
"display": "Ciclofosfamide"
}
]
},
"effectivePeriod": {
"start": "2014-03-14",
"end": "2015-02-27"
}
}
> *
print COOKIES
10:25:42.607 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:43.231 [print] {
"resourceType": "MedicationAdministration",
"id": "14882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:47.314+02:00",
"source": "#kgd24Xlj8Q5GZfV6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA01",
"display": "Ciclofosfamide"
}
]
},
"effectivePeriod": {
"start": "2014-03-14",
"end": "2015-02-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:43.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:44.406 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:48.554+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:48.554+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:44.406 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC23",
"display": "Elotuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2015-05-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:46.040 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:46.040 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZrlhYlaeRXVwUnxQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14883/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:46.040 [print] {
"resourceType": "MedicationAdministration",
"id": "14883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:50.743+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC23",
"display": "Elotuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2015-05-14"
}
}
> *
print COOKIES
10:25:46.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:46.040 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:46.040 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZrlhYlaeRXVwUnxQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14883/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:46.040 [print] {
"resourceType": "MedicationAdministration",
"id": "14883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:50.743+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC23",
"display": "Elotuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2015-05-14"
}
}
> *
print COOKIES
10:25:46.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:46.645 [print] {
"resourceType": "MedicationAdministration",
"id": "14883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:50.743+02:00",
"source": "#ZrlhYlaeRXVwUnxQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC23",
"display": "Elotuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2015-05-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:47.247 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:47.868 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:51.958+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:51.958+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:47.868 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX03",
"display": "Altretamina"
}
]
},
"effectivePeriod": {
"start": "2015-05-18",
"end": "2015-05-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:48.588 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:48.588 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7eRYrFIfPqvprB0V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14884/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:48.588 [print] {
"resourceType": "MedicationAdministration",
"id": "14884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:53.307+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX03",
"display": "Altretamina"
}
]
},
"effectivePeriod": {
"start": "2015-05-18",
"end": "2015-05-26"
}
}
> *
print COOKIES
10:25:48.588 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:48.588 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:48.588 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7eRYrFIfPqvprB0V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14884/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:48.588 [print] {
"resourceType": "MedicationAdministration",
"id": "14884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:53.307+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX03",
"display": "Altretamina"
}
]
},
"effectivePeriod": {
"start": "2015-05-18",
"end": "2015-05-26"
}
}
> *
print COOKIES
10:25:48.588 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:49.190 [print] {
"resourceType": "MedicationAdministration",
"id": "14884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:53.307+02:00",
"source": "#7eRYrFIfPqvprB0V",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX03",
"display": "Altretamina"
}
]
},
"effectivePeriod": {
"start": "2015-05-18",
"end": "2015-05-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:49.794 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:50.375 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:54.506+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:54.506+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:50.375 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC09",
"display": "Briakinumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-09",
"end": "2015-09-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:50.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:50.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YJtjdeadtrRsSOqo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14885/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:50.966 [print] {
"resourceType": "MedicationAdministration",
"id": "14885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:55.686+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC09",
"display": "Briakinumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-09",
"end": "2015-09-10"
}
}
> *
print COOKIES
10:25:50.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:50.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:50.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YJtjdeadtrRsSOqo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14885/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:50.966 [print] {
"resourceType": "MedicationAdministration",
"id": "14885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:55.686+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC09",
"display": "Briakinumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-09",
"end": "2015-09-10"
}
}
> *
print COOKIES
10:25:50.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:51.566 [print] {
"resourceType": "MedicationAdministration",
"id": "14885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:55.686+02:00",
"source": "#YJtjdeadtrRsSOqo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC09",
"display": "Briakinumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-09",
"end": "2015-09-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:52.186 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:53.010 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:56.911+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:56.911+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:53.010 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC02",
"display": "Fluorouracile"
}
]
},
"effectivePeriod": {
"start": "2016-04-19",
"end": "2015-09-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:53.628 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:53.628 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yWgFKqz5dhQmS4bH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14886/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:53.628 [print] {
"resourceType": "MedicationAdministration",
"id": "14886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:58.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC02",
"display": "Fluorouracile"
}
]
},
"effectivePeriod": {
"start": "2016-04-19",
"end": "2015-09-25"
}
}
> *
print COOKIES
10:25:53.628 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:53.628 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:53.628 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yWgFKqz5dhQmS4bH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14886/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:25:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:25:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:53.628 [print] {
"resourceType": "MedicationAdministration",
"id": "14886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:58.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC02",
"display": "Fluorouracile"
}
]
},
"effectivePeriod": {
"start": "2016-04-19",
"end": "2015-09-25"
}
}
> *
print COOKIES
10:25:53.628 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:54.215 [print] {
"resourceType": "MedicationAdministration",
"id": "14886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:25:58.347+02:00",
"source": "#yWgFKqz5dhQmS4bH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC02",
"display": "Fluorouracile"
}
]
},
"effectivePeriod": {
"start": "2016-04-19",
"end": "2015-09-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:54.852 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:55.458 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:25:59.568+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:25:59.568+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:55.459 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB03",
"display": "Salbutamolo "
}
]
},
"effectivePeriod": {
"start": "2016-07-08",
"end": "2015-12-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:56.363 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:56.363 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IbnaK9l0OdWgOQ4L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14887/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:56.363 [print] {
"resourceType": "MedicationAdministration",
"id": "14887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:01.062+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB03",
"display": "Salbutamolo "
}
]
},
"effectivePeriod": {
"start": "2016-07-08",
"end": "2015-12-03"
}
}
> *
print COOKIES
10:25:56.363 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:56.365 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:56.365 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IbnaK9l0OdWgOQ4L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14887/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:56.365 [print] {
"resourceType": "MedicationAdministration",
"id": "14887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:01.062+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB03",
"display": "Salbutamolo "
}
]
},
"effectivePeriod": {
"start": "2016-07-08",
"end": "2015-12-03"
}
}
> *
print COOKIES
10:25:56.365 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:25:57.272 [print] {
"resourceType": "MedicationAdministration",
"id": "14887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:01.062+02:00",
"source": "#IbnaK9l0OdWgOQ4L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB03",
"display": "Salbutamolo "
}
]
},
"effectivePeriod": {
"start": "2016-07-08",
"end": "2015-12-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:25:57.877 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:25:58.701 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:02.589+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:02.589+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:25:58.701 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE24",
"display": "Ponatinib"
}
]
},
"effectivePeriod": {
"start": "2016-07-21",
"end": "2016-02-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:59.343 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:59.343 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6leDLdiZzr5iYQJk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14888/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:59.343 [print] {
"resourceType": "MedicationAdministration",
"id": "14888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:04.038+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE24",
"display": "Ponatinib"
}
]
},
"effectivePeriod": {
"start": "2016-07-21",
"end": "2016-02-02"
}
}
> *
print COOKIES
10:25:59.343 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:25:59.343 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:25:59.343 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6leDLdiZzr5iYQJk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14888/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:25:59.343 [print] {
"resourceType": "MedicationAdministration",
"id": "14888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:04.038+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE24",
"display": "Ponatinib"
}
]
},
"effectivePeriod": {
"start": "2016-07-21",
"end": "2016-02-02"
}
}
> *
print COOKIES
10:25:59.343 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:00.125 [print] {
"resourceType": "MedicationAdministration",
"id": "14888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:04.038+02:00",
"source": "#6leDLdiZzr5iYQJk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE24",
"display": "Ponatinib"
}
]
},
"effectivePeriod": {
"start": "2016-07-21",
"end": "2016-02-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:00.742 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:01.336 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:05.458+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:05.458+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:01.336 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA03",
"display": "Molgramostin"
}
]
},
"effectivePeriod": {
"start": "2016-11-15",
"end": "2016-02-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:02.376 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:02.376 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3c77BTXrMePrM3ER"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14889/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:02.376 [print] {
"resourceType": "MedicationAdministration",
"id": "14889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:07.096+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA03",
"display": "Molgramostin"
}
]
},
"effectivePeriod": {
"start": "2016-11-15",
"end": "2016-02-19"
}
}
> *
print COOKIES
10:26:02.376 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:02.376 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:02.376 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3c77BTXrMePrM3ER"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14889/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:02.376 [print] {
"resourceType": "MedicationAdministration",
"id": "14889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:07.096+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA03",
"display": "Molgramostin"
}
]
},
"effectivePeriod": {
"start": "2016-11-15",
"end": "2016-02-19"
}
}
> *
print COOKIES
10:26:02.376 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:02.978 [print] {
"resourceType": "MedicationAdministration",
"id": "14889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:07.096+02:00",
"source": "#3c77BTXrMePrM3ER",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA03",
"display": "Molgramostin"
}
]
},
"effectivePeriod": {
"start": "2016-11-15",
"end": "2016-02-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:03.595 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:04.216 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:08.313+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:08.313+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:04.216 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX37",
"display": "Sitimagene ceradenovec"
}
]
},
"effectivePeriod": {
"start": "2017-03-29",
"end": "2016-04-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:05.817 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:05.817 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"udNZZ9eet6IQMK9k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14890/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:05.817 [print] {
"resourceType": "MedicationAdministration",
"id": "14890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:10.541+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX37",
"display": "Sitimagene ceradenovec"
}
]
},
"effectivePeriod": {
"start": "2017-03-29",
"end": "2016-04-15"
}
}
> *
print COOKIES
10:26:05.817 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:05.817 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:05.817 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"udNZZ9eet6IQMK9k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14890/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:05.817 [print] {
"resourceType": "MedicationAdministration",
"id": "14890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:10.541+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX37",
"display": "Sitimagene ceradenovec"
}
]
},
"effectivePeriod": {
"start": "2017-03-29",
"end": "2016-04-15"
}
}
> *
print COOKIES
10:26:05.817 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:06.442 [print] {
"resourceType": "MedicationAdministration",
"id": "14890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:10.541+02:00",
"source": "#udNZZ9eet6IQMK9k",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX37",
"display": "Sitimagene ceradenovec"
}
]
},
"effectivePeriod": {
"start": "2017-03-29",
"end": "2016-04-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:07.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:07.700 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:11.787+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:11.787+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:07.700 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC05",
"display": "Ustekinumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-07",
"end": "2016-10-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:08.285 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:08.285 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qtozx3A43KBJVlfo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14891/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:08.285 [print] {
"resourceType": "MedicationAdministration",
"id": "14891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:12.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC05",
"display": "Ustekinumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-07",
"end": "2016-10-27"
}
}
> *
print COOKIES
10:26:08.285 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:08.285 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:08.285 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qtozx3A43KBJVlfo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14891/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:08.285 [print] {
"resourceType": "MedicationAdministration",
"id": "14891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:12.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC05",
"display": "Ustekinumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-07",
"end": "2016-10-27"
}
}
> *
print COOKIES
10:26:08.285 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:08.871 [print] {
"resourceType": "MedicationAdministration",
"id": "14891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:12.996+02:00",
"source": "#qtozx3A43KBJVlfo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC05",
"display": "Ustekinumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-07",
"end": "2016-10-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:09.472 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:10.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:14.188+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:14.188+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:10.059 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC06",
"display": "Cetuximab"
}
]
},
"effectivePeriod": {
"start": "2017-11-13",
"end": "2017-06-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:10.692 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:10.692 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RUq4GZSuL4febyXS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14892/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:10.692 [print] {
"resourceType": "MedicationAdministration",
"id": "14892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:15.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC06",
"display": "Cetuximab"
}
]
},
"effectivePeriod": {
"start": "2017-11-13",
"end": "2017-06-27"
}
}
> *
print COOKIES
10:26:10.692 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:10.692 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:10.692 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RUq4GZSuL4febyXS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14892/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:10.692 [print] {
"resourceType": "MedicationAdministration",
"id": "14892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:15.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC06",
"display": "Cetuximab"
}
]
},
"effectivePeriod": {
"start": "2017-11-13",
"end": "2017-06-27"
}
}
> *
print COOKIES
10:26:10.692 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:11.263 [print] {
"resourceType": "MedicationAdministration",
"id": "14892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:15.399+02:00",
"source": "#RUq4GZSuL4febyXS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC06",
"display": "Cetuximab"
}
]
},
"effectivePeriod": {
"start": "2017-11-13",
"end": "2017-06-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:12.234 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:12.952 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:16.952+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:16.952+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:12.952 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA24",
"display": "Abatacept"
}
]
},
"effectivePeriod": {
"start": "2017-11-14",
"end": "2017-07-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:13.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:13.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kBp0OXdwsxK9SFkA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14893/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:13.554 [print] {
"resourceType": "MedicationAdministration",
"id": "14893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:18.282+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA24",
"display": "Abatacept"
}
]
},
"effectivePeriod": {
"start": "2017-11-14",
"end": "2017-07-11"
}
}
> *
print COOKIES
10:26:13.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:13.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:13.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kBp0OXdwsxK9SFkA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14893/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:13.569 [print] {
"resourceType": "MedicationAdministration",
"id": "14893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:18.282+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA24",
"display": "Abatacept"
}
]
},
"effectivePeriod": {
"start": "2017-11-14",
"end": "2017-07-11"
}
}
> *
print COOKIES
10:26:13.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:14.587 [print] {
"resourceType": "MedicationAdministration",
"id": "14893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:18.282+02:00",
"source": "#kBp0OXdwsxK9SFkA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA24",
"display": "Abatacept"
}
]
},
"effectivePeriod": {
"start": "2017-11-14",
"end": "2017-07-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:15.204 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:15.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:19.919+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:19.919+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:15.811 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX02",
"display": "Asparaginase"
}
]
},
"effectivePeriod": {
"start": "2017-12-26",
"end": "2017-08-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:16.386 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:16.386 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"84ApZPMyaBA4oJ1S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14894/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:16.386 [print] {
"resourceType": "MedicationAdministration",
"id": "14894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:21.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX02",
"display": "Asparaginase"
}
]
},
"effectivePeriod": {
"start": "2017-12-26",
"end": "2017-08-07"
}
}
> *
print COOKIES
10:26:16.386 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:16.386 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:16.386 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"84ApZPMyaBA4oJ1S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14894/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:16.386 [print] {
"resourceType": "MedicationAdministration",
"id": "14894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:21.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX02",
"display": "Asparaginase"
}
]
},
"effectivePeriod": {
"start": "2017-12-26",
"end": "2017-08-07"
}
}
> *
print COOKIES
10:26:16.386 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:17.255 [print] {
"resourceType": "MedicationAdministration",
"id": "14894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:21.098+02:00",
"source": "#84ApZPMyaBA4oJ1S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX02",
"display": "Asparaginase"
}
]
},
"effectivePeriod": {
"start": "2017-12-26",
"end": "2017-08-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:17.888 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:18.474 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:22.612+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:22.612+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:18.474 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC14",
"display": "Trastuzumab emtansine"
}
]
},
"effectivePeriod": {
"start": "2012-10-11",
"end": "2012-10-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:20.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:20.072 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ALhZnMnvNfz4LRJW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14895/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:20.072 [print] {
"resourceType": "MedicationAdministration",
"id": "14895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:24.796+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC14",
"display": "Trastuzumab emtansine"
}
]
},
"effectivePeriod": {
"start": "2012-10-11",
"end": "2012-10-04"
}
}
> *
print COOKIES
10:26:20.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:20.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:20.072 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ALhZnMnvNfz4LRJW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14895/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:20.072 [print] {
"resourceType": "MedicationAdministration",
"id": "14895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:24.796+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC14",
"display": "Trastuzumab emtansine"
}
]
},
"effectivePeriod": {
"start": "2012-10-11",
"end": "2012-10-04"
}
}
> *
print COOKIES
10:26:20.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:20.720 [print] {
"resourceType": "MedicationAdministration",
"id": "14895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:24.796+02:00",
"source": "#ALhZnMnvNfz4LRJW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC14",
"display": "Trastuzumab emtansine"
}
]
},
"effectivePeriod": {
"start": "2012-10-11",
"end": "2012-10-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:21.499 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:22.296 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:26.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:26.227+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:22.296 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB01",
"display": "Doxorubicina "
}
]
},
"effectivePeriod": {
"start": "2012-11-21",
"end": "2012-11-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:22.906 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:22.906 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8tV7vuuXmnLbHqRQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14896/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:22.906 [print] {
"resourceType": "MedicationAdministration",
"id": "14896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:27.620+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB01",
"display": "Doxorubicina "
}
]
},
"effectivePeriod": {
"start": "2012-11-21",
"end": "2012-11-30"
}
}
> *
print COOKIES
10:26:22.906 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:22.906 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:22.906 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8tV7vuuXmnLbHqRQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14896/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:22.906 [print] {
"resourceType": "MedicationAdministration",
"id": "14896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:27.620+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB01",
"display": "Doxorubicina "
}
]
},
"effectivePeriod": {
"start": "2012-11-21",
"end": "2012-11-30"
}
}
> *
print COOKIES
10:26:22.906 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:23.508 [print] {
"resourceType": "MedicationAdministration",
"id": "14896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:27.620+02:00",
"source": "#8tV7vuuXmnLbHqRQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB01",
"display": "Doxorubicina "
}
]
},
"effectivePeriod": {
"start": "2012-11-21",
"end": "2012-11-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:24.161 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:24.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:28.872+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:28.872+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:24.749 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC02",
"display": "Triaziquone"
}
]
},
"effectivePeriod": {
"start": "2013-03-08",
"end": "2013-01-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:25.332 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:25.332 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ELCslW54hiV7nOts"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14897/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:25.332 [print] {
"resourceType": "MedicationAdministration",
"id": "14897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:30.048+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC02",
"display": "Triaziquone"
}
]
},
"effectivePeriod": {
"start": "2013-03-08",
"end": "2013-01-24"
}
}
> *
print COOKIES
10:26:25.332 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:25.332 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:25.332 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ELCslW54hiV7nOts"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14897/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:25.332 [print] {
"resourceType": "MedicationAdministration",
"id": "14897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:30.048+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC02",
"display": "Triaziquone"
}
]
},
"effectivePeriod": {
"start": "2013-03-08",
"end": "2013-01-24"
}
}
> *
print COOKIES
10:26:25.332 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:25.954 [print] {
"resourceType": "MedicationAdministration",
"id": "14897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:30.048+02:00",
"source": "#ELCslW54hiV7nOts",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC02",
"display": "Triaziquone"
}
]
},
"effectivePeriod": {
"start": "2013-03-08",
"end": "2013-01-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:26.582 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:27.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:31.295+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:31.295+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:27.190 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX15",
"display": "Mifamurtide"
}
]
},
"effectivePeriod": {
"start": "2013-04-05",
"end": "2013-10-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:27.837 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:27.837 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dfzrf0TVwPO3ztQ7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14898/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:27.837 [print] {
"resourceType": "MedicationAdministration",
"id": "14898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:32.533+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX15",
"display": "Mifamurtide"
}
]
},
"effectivePeriod": {
"start": "2013-04-05",
"end": "2013-10-10"
}
}
> *
print COOKIES
10:26:27.837 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:27.853 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:27.853 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dfzrf0TVwPO3ztQ7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14898/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:27.853 [print] {
"resourceType": "MedicationAdministration",
"id": "14898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:32.533+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX15",
"display": "Mifamurtide"
}
]
},
"effectivePeriod": {
"start": "2013-04-05",
"end": "2013-10-10"
}
}
> *
print COOKIES
10:26:27.853 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:28.442 [print] {
"resourceType": "MedicationAdministration",
"id": "14898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:32.533+02:00",
"source": "#Dfzrf0TVwPO3ztQ7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX15",
"display": "Mifamurtide"
}
]
},
"effectivePeriod": {
"start": "2013-04-05",
"end": "2013-10-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:29.086 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:29.665 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:33.775+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:33.775+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:29.666 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC11",
"display": "Siltuximab"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2013-11-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:30.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:30.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f5VmPSWKJXLs4pXd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14899/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:30.229 [print] {
"resourceType": "MedicationAdministration",
"id": "14899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:34.955+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC11",
"display": "Siltuximab"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2013-11-27"
}
}
> *
print COOKIES
10:26:30.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:30.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:30.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f5VmPSWKJXLs4pXd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14899/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:30.244 [print] {
"resourceType": "MedicationAdministration",
"id": "14899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:34.955+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC11",
"display": "Siltuximab"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2013-11-27"
}
}
> *
print COOKIES
10:26:30.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:30.870 [print] {
"resourceType": "MedicationAdministration",
"id": "14899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:34.955+02:00",
"source": "#f5VmPSWKJXLs4pXd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC11",
"display": "Siltuximab"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2013-11-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:31.504 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:32.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:36.218+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:36.218+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:32.133 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB61",
"display": "Peginterferon alfa-2a, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2013-12-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:32.737 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:32.737 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2KNCiGxic69Cboca"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14900/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:32.737 [print] {
"resourceType": "MedicationAdministration",
"id": "14900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:37.440+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB61",
"display": "Peginterferon alfa-2a, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2013-12-24"
}
}
> *
print COOKIES
10:26:32.737 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:32.738 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:32.738 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2KNCiGxic69Cboca"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14900/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:32.738 [print] {
"resourceType": "MedicationAdministration",
"id": "14900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:37.440+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB61",
"display": "Peginterferon alfa-2a, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2013-12-24"
}
}
> *
print COOKIES
10:26:32.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:33.313 [print] {
"resourceType": "MedicationAdministration",
"id": "14900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:37.440+02:00",
"source": "#2KNCiGxic69Cboca",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB61",
"display": "Peginterferon alfa-2a, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2013-12-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:33.920 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:34.548 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:38.639+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:38.639+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:34.548 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC08",
"display": "Decitabina"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2014-09-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:35.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:35.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"80G8jlkaYKnlL3XU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14901/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:35.134 [print] {
"resourceType": "MedicationAdministration",
"id": "14901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:39.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC08",
"display": "Decitabina"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2014-09-24"
}
}
> *
print COOKIES
10:26:35.134 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:35.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:35.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"80G8jlkaYKnlL3XU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14901/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:35.134 [print] {
"resourceType": "MedicationAdministration",
"id": "14901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:39.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC08",
"display": "Decitabina"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2014-09-24"
}
}
> *
print COOKIES
10:26:35.134 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:35.752 [print] {
"resourceType": "MedicationAdministration",
"id": "14901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:39.840+02:00",
"source": "#80G8jlkaYKnlL3XU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC08",
"display": "Decitabina"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2014-09-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:36.375 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:36.935 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:41.088+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:41.088+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:36.935 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX01",
"display": "Azatioprina"
}
]
},
"effectivePeriod": {
"start": "2014-05-02",
"end": "2015-06-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:37.613 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:37.613 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G133CIAzQO0OVApg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14902/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:37.613 [print] {
"resourceType": "MedicationAdministration",
"id": "14902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:42.330+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX01",
"display": "Azatioprina"
}
]
},
"effectivePeriod": {
"start": "2014-05-02",
"end": "2015-06-17"
}
}
> *
print COOKIES
10:26:37.613 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:37.613 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:37.613 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G133CIAzQO0OVApg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14902/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:37.613 [print] {
"resourceType": "MedicationAdministration",
"id": "14902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:42.330+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX01",
"display": "Azatioprina"
}
]
},
"effectivePeriod": {
"start": "2014-05-02",
"end": "2015-06-17"
}
}
> *
print COOKIES
10:26:37.613 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:38.205 [print] {
"resourceType": "MedicationAdministration",
"id": "14902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:42.330+02:00",
"source": "#G133CIAzQO0OVApg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX01",
"display": "Azatioprina"
}
]
},
"effectivePeriod": {
"start": "2014-05-02",
"end": "2015-06-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:38.809 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:39.753 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:43.526+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:43.526+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:39.755 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB01",
"display": "Megestrolo "
}
]
},
"effectivePeriod": {
"start": "2014-05-12",
"end": "2015-06-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:40.337 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:40.337 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jcAwWrwmxOzCNqGr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14903/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:40.337 [print] {
"resourceType": "MedicationAdministration",
"id": "14903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:45.050+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB01",
"display": "Megestrolo "
}
]
},
"effectivePeriod": {
"start": "2014-05-12",
"end": "2015-06-24"
}
}
> *
print COOKIES
10:26:40.337 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:40.337 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:40.337 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jcAwWrwmxOzCNqGr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14903/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:40.337 [print] {
"resourceType": "MedicationAdministration",
"id": "14903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:45.050+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB01",
"display": "Megestrolo "
}
]
},
"effectivePeriod": {
"start": "2014-05-12",
"end": "2015-06-24"
}
}
> *
print COOKIES
10:26:40.337 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:40.916 [print] {
"resourceType": "MedicationAdministration",
"id": "14903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:45.050+02:00",
"source": "#jcAwWrwmxOzCNqGr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB01",
"display": "Megestrolo "
}
]
},
"effectivePeriod": {
"start": "2014-05-12",
"end": "2015-06-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:41.538 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:42.554 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:46.255+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:46.255+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:42.557 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC21",
"display": "Ramucirumab"
}
]
},
"effectivePeriod": {
"start": "2014-05-26",
"end": "2015-07-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:43.181 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:43.181 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ALnYo8AOD3rd4beY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14904/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:43.181 [print] {
"resourceType": "MedicationAdministration",
"id": "14904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:47.895+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC21",
"display": "Ramucirumab"
}
]
},
"effectivePeriod": {
"start": "2014-05-26",
"end": "2015-07-31"
}
}
> *
print COOKIES
10:26:43.181 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:43.183 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:43.184 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ALnYo8AOD3rd4beY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14904/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:43.184 [print] {
"resourceType": "MedicationAdministration",
"id": "14904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:47.895+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC21",
"display": "Ramucirumab"
}
]
},
"effectivePeriod": {
"start": "2014-05-26",
"end": "2015-07-31"
}
}
> *
print COOKIES
10:26:43.184 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:43.771 [print] {
"resourceType": "MedicationAdministration",
"id": "14904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:47.895+02:00",
"source": "#ALnYo8AOD3rd4beY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC21",
"display": "Ramucirumab"
}
]
},
"effectivePeriod": {
"start": "2014-05-26",
"end": "2015-07-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:44.351 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:44.955 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:49.063+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:49.063+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:44.956 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX18",
"display": "Tiazofurina"
}
]
},
"effectivePeriod": {
"start": "2014-12-25",
"end": "2015-09-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:45.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:45.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XpbpEuEtEi1jE7lr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14905/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:45.553 [print] {
"resourceType": "MedicationAdministration",
"id": "14905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:50.275+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX18",
"display": "Tiazofurina"
}
]
},
"effectivePeriod": {
"start": "2014-12-25",
"end": "2015-09-17"
}
}
> *
print COOKIES
10:26:45.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:45.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:45.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XpbpEuEtEi1jE7lr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14905/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:45.553 [print] {
"resourceType": "MedicationAdministration",
"id": "14905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:50.275+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX18",
"display": "Tiazofurina"
}
]
},
"effectivePeriod": {
"start": "2014-12-25",
"end": "2015-09-17"
}
}
> *
print COOKIES
10:26:45.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:46.122 [print] {
"resourceType": "MedicationAdministration",
"id": "14905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:50.275+02:00",
"source": "#XpbpEuEtEi1jE7lr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX18",
"display": "Tiazofurina"
}
]
},
"effectivePeriod": {
"start": "2014-12-25",
"end": "2015-09-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:46.747 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:47.377 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:51.470+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:51.470+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:47.378 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE02",
"display": "Gefitinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-12-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:47.965 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:47.965 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OdIKuaAjWD8LVglV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14906/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:47.965 [print] {
"resourceType": "MedicationAdministration",
"id": "14906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:52.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE02",
"display": "Gefitinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-12-17"
}
}
> *
print COOKIES
10:26:47.965 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:47.967 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:47.967 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OdIKuaAjWD8LVglV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14906/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:47.967 [print] {
"resourceType": "MedicationAdministration",
"id": "14906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:52.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE02",
"display": "Gefitinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-12-17"
}
}
> *
print COOKIES
10:26:47.967 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:48.519 [print] {
"resourceType": "MedicationAdministration",
"id": "14906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:52.672+02:00",
"source": "#OdIKuaAjWD8LVglV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE02",
"display": "Gefitinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-12-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:49.150 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:50.039 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:53.862+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:53.862+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:50.055 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA06",
"display": "Ifosfamide"
}
]
},
"effectivePeriod": {
"start": "2015-09-09",
"end": "2016-03-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:50.700 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:50.700 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"218ZrNULPL0Q68yo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14907/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:50.700 [print] {
"resourceType": "MedicationAdministration",
"id": "14907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:55.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA06",
"display": "Ifosfamide"
}
]
},
"effectivePeriod": {
"start": "2015-09-09",
"end": "2016-03-23"
}
}
> *
print COOKIES
10:26:50.700 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:50.715 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:50.715 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"218ZrNULPL0Q68yo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14907/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:50.715 [print] {
"resourceType": "MedicationAdministration",
"id": "14907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:55.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA06",
"display": "Ifosfamide"
}
]
},
"effectivePeriod": {
"start": "2015-09-09",
"end": "2016-03-23"
}
}
> *
print COOKIES
10:26:50.715 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:51.295 [print] {
"resourceType": "MedicationAdministration",
"id": "14907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:55.414+02:00",
"source": "#218ZrNULPL0Q68yo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA06",
"display": "Ifosfamide"
}
]
},
"effectivePeriod": {
"start": "2015-09-09",
"end": "2016-03-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:51.925 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:52.550 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:56.639+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:56.639+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:52.550 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA02",
"display": "Muromonab-CD3"
}
]
},
"effectivePeriod": {
"start": "2015-10-08",
"end": "2016-05-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:53.127 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:53.127 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f6mncSvMQ5w8nlde"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14908/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:53.127 [print] {
"resourceType": "MedicationAdministration",
"id": "14908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:57.842+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA02",
"display": "Muromonab-CD3"
}
]
},
"effectivePeriod": {
"start": "2015-10-08",
"end": "2016-05-12"
}
}
> *
print COOKIES
10:26:53.127 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:53.127 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:53.127 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f6mncSvMQ5w8nlde"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14908/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:26:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:53.127 [print] {
"resourceType": "MedicationAdministration",
"id": "14908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:57.842+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA02",
"display": "Muromonab-CD3"
}
]
},
"effectivePeriod": {
"start": "2015-10-08",
"end": "2016-05-12"
}
}
> *
print COOKIES
10:26:53.127 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:53.775 [print] {
"resourceType": "MedicationAdministration",
"id": "14908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:26:57.842+02:00",
"source": "#f6mncSvMQ5w8nlde",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA02",
"display": "Muromonab-CD3"
}
]
},
"effectivePeriod": {
"start": "2015-10-08",
"end": "2016-05-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:54.369 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:55.226 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:26:59.092+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:26:59.092+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:55.226 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE14",
"display": "Bosutinib"
}
]
},
"effectivePeriod": {
"start": "2015-10-19",
"end": "2016-05-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:55.803 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:55.803 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"diAOZkQa5l0N1lZB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14909/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:55.803 [print] {
"resourceType": "MedicationAdministration",
"id": "14909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:00.516+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE14",
"display": "Bosutinib"
}
]
},
"effectivePeriod": {
"start": "2015-10-19",
"end": "2016-05-26"
}
}
> *
print COOKIES
10:26:55.803 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:55.803 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:55.803 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"diAOZkQa5l0N1lZB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14909/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:26:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:55.803 [print] {
"resourceType": "MedicationAdministration",
"id": "14909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:00.516+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE14",
"display": "Bosutinib"
}
]
},
"effectivePeriod": {
"start": "2015-10-19",
"end": "2016-05-26"
}
}
> *
print COOKIES
10:26:55.803 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:56.395 [print] {
"resourceType": "MedicationAdministration",
"id": "14909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:00.516+02:00",
"source": "#diAOZkQa5l0N1lZB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE14",
"display": "Bosutinib"
}
]
},
"effectivePeriod": {
"start": "2015-10-19",
"end": "2016-05-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:57.002 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:26:57.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:01.720+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:01.720+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:26:57.618 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC01",
"display": "Thiotepa"
}
]
},
"effectivePeriod": {
"start": "2015-11-24",
"end": "2016-07-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:58.294 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:58.294 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FiDYqct9bZ816BIt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14910/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:58.294 [print] {
"resourceType": "MedicationAdministration",
"id": "14910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:02.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC01",
"display": "Thiotepa"
}
]
},
"effectivePeriod": {
"start": "2015-11-24",
"end": "2016-07-27"
}
}
> *
print COOKIES
10:26:58.294 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:26:58.294 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:26:58.294 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FiDYqct9bZ816BIt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14910/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:26:58.294 [print] {
"resourceType": "MedicationAdministration",
"id": "14910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:02.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC01",
"display": "Thiotepa"
}
]
},
"effectivePeriod": {
"start": "2015-11-24",
"end": "2016-07-27"
}
}
> *
print COOKIES
10:26:58.294 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:26:58.849 [print] {
"resourceType": "MedicationAdministration",
"id": "14910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:02.972+02:00",
"source": "#FiDYqct9bZ816BIt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC01",
"display": "Thiotepa"
}
]
},
"effectivePeriod": {
"start": "2015-11-24",
"end": "2016-07-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:26:59.465 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:00.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:04.181+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:04.181+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:00.111 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA01",
"display": "Tamoxifene "
}
]
},
"effectivePeriod": {
"start": "2015-11-26",
"end": "2016-08-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:00.717 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:00.717 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D5FPR0Hox0jsYbGG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14911/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:00.717 [print] {
"resourceType": "MedicationAdministration",
"id": "14911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:05.436+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA01",
"display": "Tamoxifene "
}
]
},
"effectivePeriod": {
"start": "2015-11-26",
"end": "2016-08-17"
}
}
> *
print COOKIES
10:27:00.717 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:00.717 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:00.717 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D5FPR0Hox0jsYbGG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14911/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:00.717 [print] {
"resourceType": "MedicationAdministration",
"id": "14911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:05.436+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA01",
"display": "Tamoxifene "
}
]
},
"effectivePeriod": {
"start": "2015-11-26",
"end": "2016-08-17"
}
}
> *
print COOKIES
10:27:00.717 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:01.338 [print] {
"resourceType": "MedicationAdministration",
"id": "14911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:05.436+02:00",
"source": "#D5FPR0Hox0jsYbGG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA01",
"display": "Tamoxifene "
}
]
},
"effectivePeriod": {
"start": "2015-11-26",
"end": "2016-08-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:01.968 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:02.584 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:06.679+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:06.679+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:02.584 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX29",
"display": "Denileukin diftitox"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-09-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:03.178 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:03.178 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TSs4ZUc37pJYuQAN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14912/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:03.178 [print] {
"resourceType": "MedicationAdministration",
"id": "14912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:07.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX29",
"display": "Denileukin diftitox"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-09-26"
}
}
> *
print COOKIES
10:27:03.178 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:03.180 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:03.180 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TSs4ZUc37pJYuQAN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14912/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:03.180 [print] {
"resourceType": "MedicationAdministration",
"id": "14912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:07.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX29",
"display": "Denileukin diftitox"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-09-26"
}
}
> *
print COOKIES
10:27:03.180 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:03.815 [print] {
"resourceType": "MedicationAdministration",
"id": "14912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:07.878+02:00",
"source": "#TSs4ZUc37pJYuQAN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX29",
"display": "Denileukin diftitox"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-09-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:04.448 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:05.067 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:09.170+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:09.170+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:05.067 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA07",
"display": "Trofosfamide"
}
]
},
"effectivePeriod": {
"start": "2016-08-22",
"end": "2016-11-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:05.884 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:05.884 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6LC0rdMGiP02v7o3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14913/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:05.884 [print] {
"resourceType": "MedicationAdministration",
"id": "14913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:10.402+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA07",
"display": "Trofosfamide"
}
]
},
"effectivePeriod": {
"start": "2016-08-22",
"end": "2016-11-02"
}
}
> *
print COOKIES
10:27:05.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:05.884 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:05.884 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6LC0rdMGiP02v7o3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14913/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:05.884 [print] {
"resourceType": "MedicationAdministration",
"id": "14913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:10.402+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA07",
"display": "Trofosfamide"
}
]
},
"effectivePeriod": {
"start": "2016-08-22",
"end": "2016-11-02"
}
}
> *
print COOKIES
10:27:05.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:06.457 [print] {
"resourceType": "MedicationAdministration",
"id": "14913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:10.402+02:00",
"source": "#6LC0rdMGiP02v7o3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA07",
"display": "Trofosfamide"
}
]
},
"effectivePeriod": {
"start": "2016-08-22",
"end": "2016-11-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:07.104 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:07.674 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:11.810+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:11.810+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:07.674 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE10",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2017-02-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:08.312 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:08.312 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wBXM49BtPmZpOKmF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14914/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:08.312 [print] {
"resourceType": "MedicationAdministration",
"id": "14914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:13.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE10",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2017-02-03"
}
}
> *
print COOKIES
10:27:08.312 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:08.312 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:08.312 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wBXM49BtPmZpOKmF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14914/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:08.312 [print] {
"resourceType": "MedicationAdministration",
"id": "14914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:13.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE10",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2017-02-03"
}
}
> *
print COOKIES
10:27:08.312 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:08.919 [print] {
"resourceType": "MedicationAdministration",
"id": "14914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:13.026+02:00",
"source": "#wBXM49BtPmZpOKmF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE10",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2017-02-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:09.573 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:10.204 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:14.280+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:14.280+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:10.204 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA08",
"display": "Prednimustine"
}
]
},
"effectivePeriod": {
"start": "2017-01-23",
"end": "2017-04-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:10.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:10.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JZ4MFes0NDtS7qaA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14915/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:10.775 [print] {
"resourceType": "MedicationAdministration",
"id": "14915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:15.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA08",
"display": "Prednimustine"
}
]
},
"effectivePeriod": {
"start": "2017-01-23",
"end": "2017-04-11"
}
}
> *
print COOKIES
10:27:10.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:10.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:10.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JZ4MFes0NDtS7qaA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14915/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:10.775 [print] {
"resourceType": "MedicationAdministration",
"id": "14915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:15.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA08",
"display": "Prednimustine"
}
]
},
"effectivePeriod": {
"start": "2017-01-23",
"end": "2017-04-11"
}
}
> *
print COOKIES
10:27:10.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:11.392 [print] {
"resourceType": "MedicationAdministration",
"id": "14915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:15.501+02:00",
"source": "#JZ4MFes0NDtS7qaA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA08",
"display": "Prednimustine"
}
]
},
"effectivePeriod": {
"start": "2017-01-23",
"end": "2017-04-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:11.981 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:12.613 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:16.693+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:16.693+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:12.614 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB07",
"display": "Nelarabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2017-04-20"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:13.248 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:13.248 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bWnInJhjgwlGjanf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14916/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:13.248 [print] {
"resourceType": "MedicationAdministration",
"id": "14916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:17.955+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB07",
"display": "Nelarabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2017-04-20"
}
}
> *
print COOKIES
10:27:13.248 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:13.248 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:13.248 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bWnInJhjgwlGjanf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14916/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:13.248 [print] {
"resourceType": "MedicationAdministration",
"id": "14916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:17.955+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB07",
"display": "Nelarabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2017-04-20"
}
}
> *
print COOKIES
10:27:13.248 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:13.832 [print] {
"resourceType": "MedicationAdministration",
"id": "14916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:17.955+02:00",
"source": "#bWnInJhjgwlGjanf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB07",
"display": "Nelarabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2017-04-20"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:14.426 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:15.042 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:19.141+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:19.141+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:15.043 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB11",
"display": "Peginterferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2017-06-13",
"end": "2017-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:15.681 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:15.681 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cIUdQD7p6SzZgh4E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14917/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:15.681 [print] {
"resourceType": "MedicationAdministration",
"id": "14917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:20.396+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB11",
"display": "Peginterferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2017-06-13",
"end": "2017-05-16"
}
}
> *
print COOKIES
10:27:15.681 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:15.683 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:15.683 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cIUdQD7p6SzZgh4E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14917/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:15.683 [print] {
"resourceType": "MedicationAdministration",
"id": "14917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:20.396+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB11",
"display": "Peginterferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2017-06-13",
"end": "2017-05-16"
}
}
> *
print COOKIES
10:27:15.683 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:16.314 [print] {
"resourceType": "MedicationAdministration",
"id": "14917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:20.396+02:00",
"source": "#cIUdQD7p6SzZgh4E",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB11",
"display": "Peginterferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2017-06-13",
"end": "2017-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:17.900 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:18.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:22.609+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:22.609+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:18.519 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX17",
"display": "Topotecan "
}
]
},
"effectivePeriod": {
"start": "2017-10-11",
"end": "2017-05-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:19.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:19.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FA0NOgjyatCq7Pg3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14918/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:19.151 [print] {
"resourceType": "MedicationAdministration",
"id": "14918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:23.865+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX17",
"display": "Topotecan "
}
]
},
"effectivePeriod": {
"start": "2017-10-11",
"end": "2017-05-26"
}
}
> *
print COOKIES
10:27:19.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:19.153 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:19.153 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FA0NOgjyatCq7Pg3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14918/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:19.153 [print] {
"resourceType": "MedicationAdministration",
"id": "14918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:23.865+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX17",
"display": "Topotecan "
}
]
},
"effectivePeriod": {
"start": "2017-10-11",
"end": "2017-05-26"
}
}
> *
print COOKIES
10:27:19.153 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:19.799 [print] {
"resourceType": "MedicationAdministration",
"id": "14918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:23.865+02:00",
"source": "#FA0NOgjyatCq7Pg3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX17",
"display": "Topotecan "
}
]
},
"effectivePeriod": {
"start": "2017-10-11",
"end": "2017-05-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:20.393 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:21.448 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:25.108+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:25.108+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:21.449 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB10",
"display": "Amrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-12-29",
"end": "2017-07-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:22.051 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:22.051 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FFYeWeWGeuW3EqZy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14919/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:22.051 [print] {
"resourceType": "MedicationAdministration",
"id": "14919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:26.770+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB10",
"display": "Amrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-12-29",
"end": "2017-07-28"
}
}
> *
print COOKIES
10:27:22.051 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:22.051 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:22.051 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FFYeWeWGeuW3EqZy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14919/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:22.051 [print] {
"resourceType": "MedicationAdministration",
"id": "14919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:26.770+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB10",
"display": "Amrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-12-29",
"end": "2017-07-28"
}
}
> *
print COOKIES
10:27:22.051 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:22.615 [print] {
"resourceType": "MedicationAdministration",
"id": "14919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:26.770+02:00",
"source": "#FFYeWeWGeuW3EqZy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB10",
"display": "Amrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-12-29",
"end": "2017-07-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:23.217 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:23.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:27.926+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:27.926+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:23.838 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato sale sodico"
}
]
},
"effectivePeriod": {
"start": "2012-11-19",
"end": "2013-01-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:24.474 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:24.474 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GEfxGpjPkaYtnGpN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14920/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:24.474 [print] {
"resourceType": "MedicationAdministration",
"id": "14920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:29.184+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato sale sodico"
}
]
},
"effectivePeriod": {
"start": "2012-11-19",
"end": "2013-01-03"
}
}
> *
print COOKIES
10:27:24.474 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:24.476 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:24.476 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GEfxGpjPkaYtnGpN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14920/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:24.476 [print] {
"resourceType": "MedicationAdministration",
"id": "14920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:29.184+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato sale sodico"
}
]
},
"effectivePeriod": {
"start": "2012-11-19",
"end": "2013-01-03"
}
}
> *
print COOKIES
10:27:24.476 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:25.088 [print] {
"resourceType": "MedicationAdministration",
"id": "14920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:29.184+02:00",
"source": "#GEfxGpjPkaYtnGpN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato sale sodico"
}
]
},
"effectivePeriod": {
"start": "2012-11-19",
"end": "2013-01-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:25.689 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:26.320 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:30.405+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:30.405+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:26.322 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE25",
"display": "Trametinib"
}
]
},
"effectivePeriod": {
"start": "2012-12-10",
"end": "2013-02-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:26.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:26.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dW6KB6L2hJfZwtM0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14921/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:26.902 [print] {
"resourceType": "MedicationAdministration",
"id": "14921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:31.610+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE25",
"display": "Trametinib"
}
]
},
"effectivePeriod": {
"start": "2012-12-10",
"end": "2013-02-01"
}
}
> *
print COOKIES
10:27:26.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:26.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:26.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dW6KB6L2hJfZwtM0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14921/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:26.902 [print] {
"resourceType": "MedicationAdministration",
"id": "14921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:31.610+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE25",
"display": "Trametinib"
}
]
},
"effectivePeriod": {
"start": "2012-12-10",
"end": "2013-02-01"
}
}
> *
print COOKIES
10:27:26.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:27.689 [print] {
"resourceType": "MedicationAdministration",
"id": "14921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:31.610+02:00",
"source": "#dW6KB6L2hJfZwtM0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE25",
"display": "Trametinib"
}
]
},
"effectivePeriod": {
"start": "2012-12-10",
"end": "2013-02-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:28.310 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:28.914 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:33.023+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:33.023+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:28.914 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC10",
"display": "Secukinumab"
}
]
},
"effectivePeriod": {
"start": "2013-04-10",
"end": "2013-10-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:29.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:29.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dRDVzREVrSxNiOxj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14922/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:29.540 [print] {
"resourceType": "MedicationAdministration",
"id": "14922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:34.245+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC10",
"display": "Secukinumab"
}
]
},
"effectivePeriod": {
"start": "2013-04-10",
"end": "2013-10-24"
}
}
> *
print COOKIES
10:27:29.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:29.541 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:29.541 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dRDVzREVrSxNiOxj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14922/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:29.541 [print] {
"resourceType": "MedicationAdministration",
"id": "14922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:34.245+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC10",
"display": "Secukinumab"
}
]
},
"effectivePeriod": {
"start": "2013-04-10",
"end": "2013-10-24"
}
}
> *
print COOKIES
10:27:29.541 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:30.160 [print] {
"resourceType": "MedicationAdministration",
"id": "14922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:34.245+02:00",
"source": "#dRDVzREVrSxNiOxj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC10",
"display": "Secukinumab"
}
]
},
"effectivePeriod": {
"start": "2013-04-10",
"end": "2013-10-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:30.782 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:31.406 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:35.496+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:35.496+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:31.406 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE07",
"display": "lapatinib"
}
]
},
"effectivePeriod": {
"start": "2013-07-05",
"end": "2014-03-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:32.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:32.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7uPYbldmAr7bxO2l"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14923/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:32.011 [print] {
"resourceType": "MedicationAdministration",
"id": "14923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:36.727+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE07",
"display": "lapatinib"
}
]
},
"effectivePeriod": {
"start": "2013-07-05",
"end": "2014-03-12"
}
}
> *
print COOKIES
10:27:32.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:32.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:32.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7uPYbldmAr7bxO2l"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14923/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:32.011 [print] {
"resourceType": "MedicationAdministration",
"id": "14923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:36.727+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE07",
"display": "lapatinib"
}
]
},
"effectivePeriod": {
"start": "2013-07-05",
"end": "2014-03-12"
}
}
> *
print COOKIES
10:27:32.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:32.660 [print] {
"resourceType": "MedicationAdministration",
"id": "14923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:36.727+02:00",
"source": "#7uPYbldmAr7bxO2l",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE07",
"display": "lapatinib"
}
]
},
"effectivePeriod": {
"start": "2013-07-05",
"end": "2014-03-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:33.277 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:33.895 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:37.996+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:37.996+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:33.901 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE26",
"display": "Cabozantinib"
}
]
},
"effectivePeriod": {
"start": "2013-10-16",
"end": "2014-04-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:34.506 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:34.506 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dDJmtKzCw5KdhZqa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14924/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:34.506 [print] {
"resourceType": "MedicationAdministration",
"id": "14924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:39.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE26",
"display": "Cabozantinib"
}
]
},
"effectivePeriod": {
"start": "2013-10-16",
"end": "2014-04-30"
}
}
> *
print COOKIES
10:27:34.506 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:34.522 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:34.522 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dDJmtKzCw5KdhZqa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14924/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:34.522 [print] {
"resourceType": "MedicationAdministration",
"id": "14924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:39.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE26",
"display": "Cabozantinib"
}
]
},
"effectivePeriod": {
"start": "2013-10-16",
"end": "2014-04-30"
}
}
> *
print COOKIES
10:27:34.522 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:35.124 [print] {
"resourceType": "MedicationAdministration",
"id": "14924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:39.222+02:00",
"source": "#dDJmtKzCw5KdhZqa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE26",
"display": "Cabozantinib"
}
]
},
"effectivePeriod": {
"start": "2013-10-16",
"end": "2014-04-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:35.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:36.334 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:40.449+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:40.449+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:36.334 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX16",
"display": "Plerixafor"
}
]
},
"effectivePeriod": {
"start": "2014-02-20",
"end": "2014-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:36.935 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:36.935 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"35uZuunZDRWeHg9i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14925/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:36.935 [print] {
"resourceType": "MedicationAdministration",
"id": "14925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:41.652+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX16",
"display": "Plerixafor"
}
]
},
"effectivePeriod": {
"start": "2014-02-20",
"end": "2014-05-16"
}
}
> *
print COOKIES
10:27:36.935 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:36.951 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:36.951 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"35uZuunZDRWeHg9i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14925/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:36.951 [print] {
"resourceType": "MedicationAdministration",
"id": "14925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:41.652+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX16",
"display": "Plerixafor"
}
]
},
"effectivePeriod": {
"start": "2014-02-20",
"end": "2014-05-16"
}
}
> *
print COOKIES
10:27:36.951 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:37.524 [print] {
"resourceType": "MedicationAdministration",
"id": "14925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:41.652+02:00",
"source": "#35uZuunZDRWeHg9i",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX16",
"display": "Plerixafor"
}
]
},
"effectivePeriod": {
"start": "2014-02-20",
"end": "2014-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:38.143 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:38.712 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:42.863+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:42.863+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:38.712 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX41",
"display": "Eribulina"
}
]
},
"effectivePeriod": {
"start": "2014-03-06",
"end": "2014-05-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:39.513 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:39.513 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kEsgjBCelgrkr3ES"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14926/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:39.513 [print] {
"resourceType": "MedicationAdministration",
"id": "14926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:44.217+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX41",
"display": "Eribulina"
}
]
},
"effectivePeriod": {
"start": "2014-03-06",
"end": "2014-05-26"
}
}
> *
print COOKIES
10:27:39.513 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:39.514 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:39.514 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kEsgjBCelgrkr3ES"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14926/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:39.515 [print] {
"resourceType": "MedicationAdministration",
"id": "14926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:44.217+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX41",
"display": "Eribulina"
}
]
},
"effectivePeriod": {
"start": "2014-03-06",
"end": "2014-05-26"
}
}
> *
print COOKIES
10:27:39.515 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:40.132 [print] {
"resourceType": "MedicationAdministration",
"id": "14926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:44.217+02:00",
"source": "#kEsgjBCelgrkr3ES",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX41",
"display": "Eribulina"
}
]
},
"effectivePeriod": {
"start": "2014-03-06",
"end": "2014-05-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:40.785 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:41.346 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:45.494+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:45.494+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:41.346 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC24",
"display": "Daratumumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-08",
"end": "2014-05-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:41.963 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:41.963 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TjR2fZlafFsA5s4w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14927/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:41.963 [print] {
"resourceType": "MedicationAdministration",
"id": "14927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:46.685+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC24",
"display": "Daratumumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-08",
"end": "2014-05-30"
}
}
> *
print COOKIES
10:27:41.963 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:41.963 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:41.963 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TjR2fZlafFsA5s4w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14927/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:41.963 [print] {
"resourceType": "MedicationAdministration",
"id": "14927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:46.685+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC24",
"display": "Daratumumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-08",
"end": "2014-05-30"
}
}
> *
print COOKIES
10:27:41.963 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:42.566 [print] {
"resourceType": "MedicationAdministration",
"id": "14927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:46.685+02:00",
"source": "#TjR2fZlafFsA5s4w",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC24",
"display": "Daratumumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-08",
"end": "2014-05-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:43.231 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:43.831 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:47.952+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:47.952+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:43.831 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB06",
"display": "Interferone alfa-n1"
}
]
},
"effectivePeriod": {
"start": "2014-05-30",
"end": "2014-07-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:44.470 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:44.470 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b1qh96fFRox7TSzr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14928/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:44.470 [print] {
"resourceType": "MedicationAdministration",
"id": "14928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:49.183+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB06",
"display": "Interferone alfa-n1"
}
]
},
"effectivePeriod": {
"start": "2014-05-30",
"end": "2014-07-03"
}
}
> *
print COOKIES
10:27:44.470 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:44.470 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:44.470 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b1qh96fFRox7TSzr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14928/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:44.470 [print] {
"resourceType": "MedicationAdministration",
"id": "14928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:49.183+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB06",
"display": "Interferone alfa-n1"
}
]
},
"effectivePeriod": {
"start": "2014-05-30",
"end": "2014-07-03"
}
}
> *
print COOKIES
10:27:44.470 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:46.281 [print] {
"resourceType": "MedicationAdministration",
"id": "14928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:49.183+02:00",
"source": "#b1qh96fFRox7TSzr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB06",
"display": "Interferone alfa-n1"
}
]
},
"effectivePeriod": {
"start": "2014-05-30",
"end": "2014-07-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:46.925 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:47.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:51.642+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:51.642+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:47.538 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB02",
"display": "Daunorubicina "
}
]
},
"effectivePeriod": {
"start": "2014-06-04",
"end": "2014-08-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:48.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"646"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:48.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5XAARQyj2VLIQkOf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14929/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:48.151 [print] {
"resourceType": "MedicationAdministration",
"id": "14929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:52.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB02",
"display": "Daunorubicina "
}
]
},
"effectivePeriod": {
"start": "2014-06-04",
"end": "2014-08-26"
}
}
> *
print COOKIES
10:27:48.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:48.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"646"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:48.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5XAARQyj2VLIQkOf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14929/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:48.151 [print] {
"resourceType": "MedicationAdministration",
"id": "14929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:52.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB02",
"display": "Daunorubicina "
}
]
},
"effectivePeriod": {
"start": "2014-06-04",
"end": "2014-08-26"
}
}
> *
print COOKIES
10:27:48.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:48.788 [print] {
"resourceType": "MedicationAdministration",
"id": "14929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:52.845+02:00",
"source": "#5XAARQyj2VLIQkOf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB02",
"display": "Daunorubicina "
}
]
},
"effectivePeriod": {
"start": "2014-06-04",
"end": "2014-08-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:49.416 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:50.217 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:54.142+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:54.142+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:50.217 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CC01",
"display": "Demecolcina"
}
]
},
"effectivePeriod": {
"start": "2014-12-04",
"end": "2015-03-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:50.834 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:50.834 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NGkt58qDA02zHl1a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14930/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:50.834 [print] {
"resourceType": "MedicationAdministration",
"id": "14930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:55.562+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CC01",
"display": "Demecolcina"
}
]
},
"effectivePeriod": {
"start": "2014-12-04",
"end": "2015-03-06"
}
}
> *
print COOKIES
10:27:50.834 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:50.850 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:50.850 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NGkt58qDA02zHl1a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14930/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:50.850 [print] {
"resourceType": "MedicationAdministration",
"id": "14930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:55.562+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CC01",
"display": "Demecolcina"
}
]
},
"effectivePeriod": {
"start": "2014-12-04",
"end": "2015-03-06"
}
}
> *
print COOKIES
10:27:50.850 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:51.483 [print] {
"resourceType": "MedicationAdministration",
"id": "14930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:55.562+02:00",
"source": "#NGkt58qDA02zHl1a",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CC01",
"display": "Demecolcina"
}
]
},
"effectivePeriod": {
"start": "2014-12-04",
"end": "2015-03-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:52.091 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:52.685 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:56.808+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:56.808+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:52.685 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB06",
"display": "Idarubicina "
}
]
},
"effectivePeriod": {
"start": "2014-12-08",
"end": "2015-03-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:53.334 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:53.334 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zBaiKw0DnWq7fBRS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14931/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:53.334 [print] {
"resourceType": "MedicationAdministration",
"id": "14931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:58.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB06",
"display": "Idarubicina "
}
]
},
"effectivePeriod": {
"start": "2014-12-08",
"end": "2015-03-25"
}
}
> *
print COOKIES
10:27:53.334 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:53.349 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:53.349 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zBaiKw0DnWq7fBRS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14931/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:27:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:53.349 [print] {
"resourceType": "MedicationAdministration",
"id": "14931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:58.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB06",
"display": "Idarubicina "
}
]
},
"effectivePeriod": {
"start": "2014-12-08",
"end": "2015-03-25"
}
}
> *
print COOKIES
10:27:53.349 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:53.986 [print] {
"resourceType": "MedicationAdministration",
"id": "14931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:27:58.059+02:00",
"source": "#zBaiKw0DnWq7fBRS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB06",
"display": "Idarubicina "
}
]
},
"effectivePeriod": {
"start": "2014-12-08",
"end": "2015-03-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:54.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:55.197 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:27:59.331+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:27:59.331+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:55.197 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC02",
"display": "Rituximab"
}
]
},
"effectivePeriod": {
"start": "2015-07-30",
"end": "2015-04-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:55.814 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:55.814 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NfKAh0z4jtkFlM07"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14932/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:55.814 [print] {
"resourceType": "MedicationAdministration",
"id": "14932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:00.546+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC02",
"display": "Rituximab"
}
]
},
"effectivePeriod": {
"start": "2015-07-30",
"end": "2015-04-13"
}
}
> *
print COOKIES
10:27:55.814 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:55.814 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:55.814 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NfKAh0z4jtkFlM07"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14932/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:27:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:55.814 [print] {
"resourceType": "MedicationAdministration",
"id": "14932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:00.546+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC02",
"display": "Rituximab"
}
]
},
"effectivePeriod": {
"start": "2015-07-30",
"end": "2015-04-13"
}
}
> *
print COOKIES
10:27:55.814 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:56.453 [print] {
"resourceType": "MedicationAdministration",
"id": "14932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:00.546+02:00",
"source": "#NfKAh0z4jtkFlM07",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC02",
"display": "Rituximab"
}
]
},
"effectivePeriod": {
"start": "2015-07-30",
"end": "2015-04-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:57.100 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:27:57.722 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:01.813+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:01.813+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:27:57.722 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE15",
"display": "Vemurafenib"
}
]
},
"effectivePeriod": {
"start": "2015-09-01",
"end": "2015-05-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:58.346 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:58.346 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IN0hylq3a5orVk5N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14933/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:58.346 [print] {
"resourceType": "MedicationAdministration",
"id": "14933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:03.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE15",
"display": "Vemurafenib"
}
]
},
"effectivePeriod": {
"start": "2015-09-01",
"end": "2015-05-19"
}
}
> *
print COOKIES
10:27:58.346 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:27:58.346 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:27:58.346 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IN0hylq3a5orVk5N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14933/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:27:58.346 [print] {
"resourceType": "MedicationAdministration",
"id": "14933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:03.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE15",
"display": "Vemurafenib"
}
]
},
"effectivePeriod": {
"start": "2015-09-01",
"end": "2015-05-19"
}
}
> *
print COOKIES
10:27:58.346 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:27:58.914 [print] {
"resourceType": "MedicationAdministration",
"id": "14933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:03.059+02:00",
"source": "#IN0hylq3a5orVk5N",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE15",
"display": "Vemurafenib"
}
]
},
"effectivePeriod": {
"start": "2015-09-01",
"end": "2015-05-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:27:59.499 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:00.118 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:04.216+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:04.216+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:00.118 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX35",
"display": "Anagrelide "
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-06-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:00.739 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:00.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZjPCNjXxZAFrA1YW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14934/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:00.739 [print] {
"resourceType": "MedicationAdministration",
"id": "14934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:05.453+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX35",
"display": "Anagrelide "
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-06-22"
}
}
> *
print COOKIES
10:28:00.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:00.739 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:00.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZjPCNjXxZAFrA1YW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14934/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:00.739 [print] {
"resourceType": "MedicationAdministration",
"id": "14934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:05.453+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX35",
"display": "Anagrelide "
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-06-22"
}
}
> *
print COOKIES
10:28:00.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:01.309 [print] {
"resourceType": "MedicationAdministration",
"id": "14934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:05.453+02:00",
"source": "#ZjPCNjXxZAFrA1YW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX35",
"display": "Anagrelide "
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-06-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:01.917 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:02.583 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:06.630+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:06.630+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:02.586 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA03",
"display": "Fulvestrant"
}
]
},
"effectivePeriod": {
"start": "2016-05-11",
"end": "2015-11-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:03.202 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:03.202 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UeX9zFhSyslUY6Ag"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14935/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:03.202 [print] {
"resourceType": "MedicationAdministration",
"id": "14935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:07.923+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA03",
"display": "Fulvestrant"
}
]
},
"effectivePeriod": {
"start": "2016-05-11",
"end": "2015-11-18"
}
}
> *
print COOKIES
10:28:03.202 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:03.202 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:03.202 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UeX9zFhSyslUY6Ag"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14935/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:03.202 [print] {
"resourceType": "MedicationAdministration",
"id": "14935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:07.923+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA03",
"display": "Fulvestrant"
}
]
},
"effectivePeriod": {
"start": "2016-05-11",
"end": "2015-11-18"
}
}
> *
print COOKIES
10:28:03.202 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:03.767 [print] {
"resourceType": "MedicationAdministration",
"id": "14935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:07.923+02:00",
"source": "#UeX9zFhSyslUY6Ag",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA03",
"display": "Fulvestrant"
}
]
},
"effectivePeriod": {
"start": "2016-05-11",
"end": "2015-11-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:04.394 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:04.999 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:09.098+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:09.098+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:04.999 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC07",
"display": "Azacitidina"
}
]
},
"effectivePeriod": {
"start": "2016-09-02",
"end": "2016-02-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:05.573 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:05.574 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oT7ENaaMEWey5OSD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14936/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:05.574 [print] {
"resourceType": "MedicationAdministration",
"id": "14936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:10.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC07",
"display": "Azacitidina"
}
]
},
"effectivePeriod": {
"start": "2016-09-02",
"end": "2016-02-01"
}
}
> *
print COOKIES
10:28:05.574 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:05.575 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:05.575 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oT7ENaaMEWey5OSD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14936/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:05.575 [print] {
"resourceType": "MedicationAdministration",
"id": "14936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:10.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC07",
"display": "Azacitidina"
}
]
},
"effectivePeriod": {
"start": "2016-09-02",
"end": "2016-02-01"
}
}
> *
print COOKIES
10:28:05.575 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:06.133 [print] {
"resourceType": "MedicationAdministration",
"id": "14936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:10.292+02:00",
"source": "#oT7ENaaMEWey5OSD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC07",
"display": "Azacitidina"
}
]
},
"effectivePeriod": {
"start": "2016-09-02",
"end": "2016-02-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:06.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:07.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:11.472+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:11.472+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:07.409 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA03",
"display": "Melphalan"
}
]
},
"effectivePeriod": {
"start": "2017-02-22",
"end": "2016-02-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:08.038 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:08.038 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b2cF94ffcOZeqhEA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14937/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:08.038 [print] {
"resourceType": "MedicationAdministration",
"id": "14937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:12.733+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA03",
"display": "Melphalan"
}
]
},
"effectivePeriod": {
"start": "2017-02-22",
"end": "2016-02-23"
}
}
> *
print COOKIES
10:28:08.038 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:08.040 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:08.040 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b2cF94ffcOZeqhEA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14937/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:08.040 [print] {
"resourceType": "MedicationAdministration",
"id": "14937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:12.733+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA03",
"display": "Melphalan"
}
]
},
"effectivePeriod": {
"start": "2017-02-22",
"end": "2016-02-23"
}
}
> *
print COOKIES
10:28:08.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:08.617 [print] {
"resourceType": "MedicationAdministration",
"id": "14937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:12.733+02:00",
"source": "#b2cF94ffcOZeqhEA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA03",
"display": "Melphalan"
}
]
},
"effectivePeriod": {
"start": "2017-02-22",
"end": "2016-02-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:09.249 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:09.872 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:13.976+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:13.976+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:09.875 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA15",
"display": "Alefacept"
}
]
},
"effectivePeriod": {
"start": "2017-03-21",
"end": "2016-03-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:10.456 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:10.456 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WosOBn3jbuOmgzvd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14938/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:10.456 [print] {
"resourceType": "MedicationAdministration",
"id": "14938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:15.171+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA15",
"display": "Alefacept"
}
]
},
"effectivePeriod": {
"start": "2017-03-21",
"end": "2016-03-29"
}
}
> *
print COOKIES
10:28:10.456 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:10.456 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:10.456 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WosOBn3jbuOmgzvd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14938/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:10.456 [print] {
"resourceType": "MedicationAdministration",
"id": "14938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:15.171+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA15",
"display": "Alefacept"
}
]
},
"effectivePeriod": {
"start": "2017-03-21",
"end": "2016-03-29"
}
}
> *
print COOKIES
10:28:10.456 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:11.027 [print] {
"resourceType": "MedicationAdministration",
"id": "14938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:15.171+02:00",
"source": "#WosOBn3jbuOmgzvd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA15",
"display": "Alefacept"
}
]
},
"effectivePeriod": {
"start": "2017-03-21",
"end": "2016-03-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:11.647 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:12.240 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:16.365+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:16.365+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:12.240 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA23",
"display": "Natalizumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-14",
"end": "2016-04-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:12.877 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:12.877 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jFlGYYKjk8zNluug"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14939/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:12.877 [print] {
"resourceType": "MedicationAdministration",
"id": "14939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:17.589+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA23",
"display": "Natalizumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-14",
"end": "2016-04-14"
}
}
> *
print COOKIES
10:28:12.877 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:12.877 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:12.877 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jFlGYYKjk8zNluug"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14939/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:12.877 [print] {
"resourceType": "MedicationAdministration",
"id": "14939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:17.589+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA23",
"display": "Natalizumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-14",
"end": "2016-04-14"
}
}
> *
print COOKIES
10:28:12.877 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:13.479 [print] {
"resourceType": "MedicationAdministration",
"id": "14939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:17.589+02:00",
"source": "#jFlGYYKjk8zNluug",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA23",
"display": "Natalizumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-14",
"end": "2016-04-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:14.096 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:14.666 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:18.814+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:18.814+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:14.681 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA04",
"display": "Fosfestrolo"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2016-07-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:15.266 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:15.266 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OrkmndG5hL6RpAE4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14940/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:15.266 [print] {
"resourceType": "MedicationAdministration",
"id": "14940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:19.980+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA04",
"display": "Fosfestrolo"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2016-07-11"
}
}
> *
print COOKIES
10:28:15.266 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:15.266 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:15.266 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OrkmndG5hL6RpAE4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14940/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:15.266 [print] {
"resourceType": "MedicationAdministration",
"id": "14940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:19.980+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA04",
"display": "Fosfestrolo"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2016-07-11"
}
}
> *
print COOKIES
10:28:15.266 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:16.885 [print] {
"resourceType": "MedicationAdministration",
"id": "14940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:19.980+02:00",
"source": "#OrkmndG5hL6RpAE4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA04",
"display": "Fosfestrolo"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2016-07-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:17.476 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:18.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:22.197+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:22.197+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:18.065 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC03",
"display": "Tegafur"
}
]
},
"effectivePeriod": {
"start": "2017-09-19",
"end": "2017-03-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:18.666 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"636"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:18.666 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5vtQrHeSLfHfQs1T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14941/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:18.666 [print] {
"resourceType": "MedicationAdministration",
"id": "14941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:23.398+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC03",
"display": "Tegafur"
}
]
},
"effectivePeriod": {
"start": "2017-09-19",
"end": "2017-03-22"
}
}
> *
print COOKIES
10:28:18.666 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:18.682 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"636"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:18.682 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5vtQrHeSLfHfQs1T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14941/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:18.682 [print] {
"resourceType": "MedicationAdministration",
"id": "14941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:23.398+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC03",
"display": "Tegafur"
}
]
},
"effectivePeriod": {
"start": "2017-09-19",
"end": "2017-03-22"
}
}
> *
print COOKIES
10:28:18.682 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:19.251 [print] {
"resourceType": "MedicationAdministration",
"id": "14941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:23.398+02:00",
"source": "#5vtQrHeSLfHfQs1T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC03",
"display": "Tegafur"
}
]
},
"effectivePeriod": {
"start": "2017-09-19",
"end": "2017-03-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:19.915 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:20.485 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:24.634+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:24.634+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:20.485 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE29",
"display": "Lenvatinib"
}
]
},
"effectivePeriod": {
"start": "2017-11-09",
"end": "2017-07-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:21.079 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:21.079 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"om1YVYX8syuZJaP3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14942/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:21.079 [print] {
"resourceType": "MedicationAdministration",
"id": "14942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:25.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE29",
"display": "Lenvatinib"
}
]
},
"effectivePeriod": {
"start": "2017-11-09",
"end": "2017-07-10"
}
}
> *
print COOKIES
10:28:21.079 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:21.079 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:21.079 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"om1YVYX8syuZJaP3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14942/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:21.079 [print] {
"resourceType": "MedicationAdministration",
"id": "14942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:25.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE29",
"display": "Lenvatinib"
}
]
},
"effectivePeriod": {
"start": "2017-11-09",
"end": "2017-07-10"
}
}
> *
print COOKIES
10:28:21.079 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:21.665 [print] {
"resourceType": "MedicationAdministration",
"id": "14942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:25.791+02:00",
"source": "#om1YVYX8syuZJaP3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE29",
"display": "Lenvatinib"
}
]
},
"effectivePeriod": {
"start": "2017-11-09",
"end": "2017-07-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:22.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:22.927 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:27.004+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:27.004+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:22.927 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA03",
"display": "Vindesina "
}
]
},
"effectivePeriod": {
"start": "2017-11-24",
"end": "2017-09-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:23.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:23.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3zUq07FEnlu1i1IY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14943/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:23.547 [print] {
"resourceType": "MedicationAdministration",
"id": "14943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:28.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA03",
"display": "Vindesina "
}
]
},
"effectivePeriod": {
"start": "2017-11-24",
"end": "2017-09-18"
}
}
> *
print COOKIES
10:28:23.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:23.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:23.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3zUq07FEnlu1i1IY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14943/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:23.547 [print] {
"resourceType": "MedicationAdministration",
"id": "14943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:28.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA03",
"display": "Vindesina "
}
]
},
"effectivePeriod": {
"start": "2017-11-24",
"end": "2017-09-18"
}
}
> *
print COOKIES
10:28:23.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:24.161 [print] {
"resourceType": "MedicationAdministration",
"id": "14943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:28.276+02:00",
"source": "#3zUq07FEnlu1i1IY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA03",
"display": "Vindesina "
}
]
},
"effectivePeriod": {
"start": "2017-11-24",
"end": "2017-09-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:24.828 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:25.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:29.520+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:29.520+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:25.397 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA10",
"display": "Sirolimus"
}
]
},
"effectivePeriod": {
"start": "2017-12-20",
"end": "2017-12-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:25.999 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:25.999 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b7KGxDvjRCP7Qws6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14944/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:25.999 [print] {
"resourceType": "MedicationAdministration",
"id": "14944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:30.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA10",
"display": "Sirolimus"
}
]
},
"effectivePeriod": {
"start": "2017-12-20",
"end": "2017-12-27"
}
}
> *
print COOKIES
10:28:25.999 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:25.999 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:25.999 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b7KGxDvjRCP7Qws6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14944/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:25.999 [print] {
"resourceType": "MedicationAdministration",
"id": "14944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:30.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA10",
"display": "Sirolimus"
}
]
},
"effectivePeriod": {
"start": "2017-12-20",
"end": "2017-12-27"
}
}
> *
print COOKIES
10:28:25.999 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:26.582 [print] {
"resourceType": "MedicationAdministration",
"id": "14944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:30.724+02:00",
"source": "#b7KGxDvjRCP7Qws6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA10",
"display": "Sirolimus"
}
]
},
"effectivePeriod": {
"start": "2017-12-20",
"end": "2017-12-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:27.154 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:27.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:31.875+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:31.875+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:27.764 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX07",
"display": "Poly I:C"
}
]
},
"effectivePeriod": {
"start": "2012-10-18",
"end": "2012-09-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:28.367 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:28.367 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NXyqsXXwtaVOj4Y4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14945/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:28.367 [print] {
"resourceType": "MedicationAdministration",
"id": "14945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:33.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX07",
"display": "Poly I:C"
}
]
},
"effectivePeriod": {
"start": "2012-10-18",
"end": "2012-09-26"
}
}
> *
print COOKIES
10:28:28.367 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:28.367 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:28.367 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NXyqsXXwtaVOj4Y4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14945/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:28.367 [print] {
"resourceType": "MedicationAdministration",
"id": "14945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:33.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX07",
"display": "Poly I:C"
}
]
},
"effectivePeriod": {
"start": "2012-10-18",
"end": "2012-09-26"
}
}
> *
print COOKIES
10:28:28.367 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:28.958 [print] {
"resourceType": "MedicationAdministration",
"id": "14945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:33.090+02:00",
"source": "#NXyqsXXwtaVOj4Y4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX07",
"display": "Poly I:C"
}
]
},
"effectivePeriod": {
"start": "2012-10-18",
"end": "2012-09-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:29.575 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:30.195 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:34.307+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:34.307+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:30.195 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX05",
"display": "Pirfenidone"
}
]
},
"effectivePeriod": {
"start": "2012-10-26",
"end": "2012-11-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:30.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:30.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O8ej9BO6xUpo0C1k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14946/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:30.780 [print] {
"resourceType": "MedicationAdministration",
"id": "14946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:35.495+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX05",
"display": "Pirfenidone"
}
]
},
"effectivePeriod": {
"start": "2012-10-26",
"end": "2012-11-07"
}
}
> *
print COOKIES
10:28:30.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:30.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:30.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O8ej9BO6xUpo0C1k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14946/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:30.780 [print] {
"resourceType": "MedicationAdministration",
"id": "14946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:35.495+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX05",
"display": "Pirfenidone"
}
]
},
"effectivePeriod": {
"start": "2012-10-26",
"end": "2012-11-07"
}
}
> *
print COOKIES
10:28:30.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:31.338 [print] {
"resourceType": "MedicationAdministration",
"id": "14946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:35.495+02:00",
"source": "#O8ej9BO6xUpo0C1k",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX05",
"display": "Pirfenidone"
}
]
},
"effectivePeriod": {
"start": "2012-10-26",
"end": "2012-11-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:31.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:32.566 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:36.701+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:36.701+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:32.566 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX01",
"display": "Lentinan"
}
]
},
"effectivePeriod": {
"start": "2012-12-21",
"end": "2012-11-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:33.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:33.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bl3jkKeiHKnA2wp2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14947/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:33.151 [print] {
"resourceType": "MedicationAdministration",
"id": "14947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:37.871+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX01",
"display": "Lentinan"
}
]
},
"effectivePeriod": {
"start": "2012-12-21",
"end": "2012-11-29"
}
}
> *
print COOKIES
10:28:33.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:33.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:33.167 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bl3jkKeiHKnA2wp2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14947/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:33.167 [print] {
"resourceType": "MedicationAdministration",
"id": "14947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:37.871+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX01",
"display": "Lentinan"
}
]
},
"effectivePeriod": {
"start": "2012-12-21",
"end": "2012-11-29"
}
}
> *
print COOKIES
10:28:33.167 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:33.731 [print] {
"resourceType": "MedicationAdministration",
"id": "14947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:37.871+02:00",
"source": "#bl3jkKeiHKnA2wp2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX01",
"display": "Lentinan"
}
]
},
"effectivePeriod": {
"start": "2012-12-21",
"end": "2012-11-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:34.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:34.918 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:39.030+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:39.030+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:34.918 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB05",
"display": "Fludarabina "
}
]
},
"effectivePeriod": {
"start": "2013-02-18",
"end": "2012-12-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:35.509 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:35.509 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JqqGlE4DwaJTb7SI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14948/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:35.509 [print] {
"resourceType": "MedicationAdministration",
"id": "14948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:40.236+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB05",
"display": "Fludarabina "
}
]
},
"effectivePeriod": {
"start": "2013-02-18",
"end": "2012-12-13"
}
}
> *
print COOKIES
10:28:35.509 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:35.524 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:35.524 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JqqGlE4DwaJTb7SI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14948/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:35.524 [print] {
"resourceType": "MedicationAdministration",
"id": "14948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:40.236+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB05",
"display": "Fludarabina "
}
]
},
"effectivePeriod": {
"start": "2013-02-18",
"end": "2012-12-13"
}
}
> *
print COOKIES
10:28:35.524 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:36.097 [print] {
"resourceType": "MedicationAdministration",
"id": "14948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:40.236+02:00",
"source": "#JqqGlE4DwaJTb7SI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB05",
"display": "Fludarabina "
}
]
},
"effectivePeriod": {
"start": "2013-02-18",
"end": "2012-12-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:36.702 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:37.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:41.407+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:41.407+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:37.682 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC11",
"display": "Ipilimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-04",
"end": "2013-03-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:38.261 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:38.261 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"THnUjIU0iOhDcqq7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14949/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:38.261 [print] {
"resourceType": "MedicationAdministration",
"id": "14949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:42.983+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC11",
"display": "Ipilimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-04",
"end": "2013-03-01"
}
}
> *
print COOKIES
10:28:38.261 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:38.261 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:38.261 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"THnUjIU0iOhDcqq7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14949/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:38.261 [print] {
"resourceType": "MedicationAdministration",
"id": "14949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:42.983+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC11",
"display": "Ipilimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-04",
"end": "2013-03-01"
}
}
> *
print COOKIES
10:28:38.261 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:38.859 [print] {
"resourceType": "MedicationAdministration",
"id": "14949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:42.983+02:00",
"source": "#THnUjIU0iOhDcqq7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC11",
"display": "Ipilimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-04",
"end": "2013-03-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:39.499 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:40.201 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:44.212+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:44.212+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:40.201 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA05",
"display": "Mecloretamina"
}
]
},
"effectivePeriod": {
"start": "2013-11-25",
"end": "2013-06-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:40.764 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:40.764 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iBVGMul0aWPP7fLW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14950/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:40.764 [print] {
"resourceType": "MedicationAdministration",
"id": "14950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:45.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA05",
"display": "Mecloretamina"
}
]
},
"effectivePeriod": {
"start": "2013-11-25",
"end": "2013-06-12"
}
}
> *
print COOKIES
10:28:40.764 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:40.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:40.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iBVGMul0aWPP7fLW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14950/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:40.779 [print] {
"resourceType": "MedicationAdministration",
"id": "14950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:45.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA05",
"display": "Mecloretamina"
}
]
},
"effectivePeriod": {
"start": "2013-11-25",
"end": "2013-06-12"
}
}
> *
print COOKIES
10:28:40.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:41.380 [print] {
"resourceType": "MedicationAdministration",
"id": "14950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:45.496+02:00",
"source": "#iBVGMul0aWPP7fLW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA05",
"display": "Mecloretamina"
}
]
},
"effectivePeriod": {
"start": "2013-11-25",
"end": "2013-06-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:42.019 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:42.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:46.731+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:46.731+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:42.628 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC27",
"display": "Olaratumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-17",
"end": "2013-07-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:43.215 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:43.215 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7PjSZBIswIQ8H8Et"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14951/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:43.215 [print] {
"resourceType": "MedicationAdministration",
"id": "14951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:47.934+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC27",
"display": "Olaratumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-17",
"end": "2013-07-25"
}
}
> *
print COOKIES
10:28:43.215 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:43.215 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:43.215 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7PjSZBIswIQ8H8Et"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14951/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:43.215 [print] {
"resourceType": "MedicationAdministration",
"id": "14951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:47.934+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC27",
"display": "Olaratumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-17",
"end": "2013-07-25"
}
}
> *
print COOKIES
10:28:43.215 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:43.822 [print] {
"resourceType": "MedicationAdministration",
"id": "14951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:47.934+02:00",
"source": "#7PjSZBIswIQ8H8Et",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC27",
"display": "Olaratumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-17",
"end": "2013-07-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:44.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:45.037 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:49.153+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:49.153+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:45.037 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC53",
"display": "Tegafur + gimeracil + oteracil "
}
]
},
"effectivePeriod": {
"start": "2014-06-03",
"end": "2013-09-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:45.617 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"660"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:45.617 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nI8KPhpauGsOiHRk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14952/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:45.617 [print] {
"resourceType": "MedicationAdministration",
"id": "14952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:50.339+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC53",
"display": "Tegafur + gimeracil + oteracil "
}
]
},
"effectivePeriod": {
"start": "2014-06-03",
"end": "2013-09-30"
}
}
> *
print COOKIES
10:28:45.617 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:45.617 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"660"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:45.617 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nI8KPhpauGsOiHRk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14952/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:45.617 [print] {
"resourceType": "MedicationAdministration",
"id": "14952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:50.339+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC53",
"display": "Tegafur + gimeracil + oteracil "
}
]
},
"effectivePeriod": {
"start": "2014-06-03",
"end": "2013-09-30"
}
}
> *
print COOKIES
10:28:45.617 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:46.210 [print] {
"resourceType": "MedicationAdministration",
"id": "14952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:50.339+02:00",
"source": "#nI8KPhpauGsOiHRk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC53",
"display": "Tegafur + gimeracil + oteracil "
}
]
},
"effectivePeriod": {
"start": "2014-06-03",
"end": "2013-09-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:46.827 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:47.449 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:51.558+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:51.558+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:47.449 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA05",
"display": "Polyplatfllen"
}
]
},
"effectivePeriod": {
"start": "2014-12-23",
"end": "2013-10-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:48.066 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:48.066 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1VYP2mpc5xjPONL7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14953/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:48.066 [print] {
"resourceType": "MedicationAdministration",
"id": "14953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:52.783+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA05",
"display": "Polyplatfllen"
}
]
},
"effectivePeriod": {
"start": "2014-12-23",
"end": "2013-10-17"
}
}
> *
print COOKIES
10:28:48.066 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:48.066 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:48.066 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1VYP2mpc5xjPONL7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14953/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:48.066 [print] {
"resourceType": "MedicationAdministration",
"id": "14953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:52.783+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA05",
"display": "Polyplatfllen"
}
]
},
"effectivePeriod": {
"start": "2014-12-23",
"end": "2013-10-17"
}
}
> *
print COOKIES
10:28:48.066 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:48.683 [print] {
"resourceType": "MedicationAdministration",
"id": "14953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:52.783+02:00",
"source": "#1VYP2mpc5xjPONL7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA05",
"display": "Polyplatfllen"
}
]
},
"effectivePeriod": {
"start": "2014-12-23",
"end": "2013-10-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:49.285 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:49.960 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:54.006+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:54.006+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:49.960 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB04",
"display": "Aclarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-03-12",
"end": "2014-02-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:50.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:50.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bpQWxqdUHcmcmS0D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14954/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:50.569 [print] {
"resourceType": "MedicationAdministration",
"id": "14954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:55.295+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB04",
"display": "Aclarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-03-12",
"end": "2014-02-18"
}
}
> *
print COOKIES
10:28:50.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:50.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:50.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bpQWxqdUHcmcmS0D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14954/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:50.569 [print] {
"resourceType": "MedicationAdministration",
"id": "14954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:55.295+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB04",
"display": "Aclarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-03-12",
"end": "2014-02-18"
}
}
> *
print COOKIES
10:28:50.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:51.170 [print] {
"resourceType": "MedicationAdministration",
"id": "14954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:55.295+02:00",
"source": "#bpQWxqdUHcmcmS0D",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB04",
"display": "Aclarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-03-12",
"end": "2014-02-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:51.770 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:52.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:56.487+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:56.487+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:52.397 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX09",
"display": "Thimopentin"
}
]
},
"effectivePeriod": {
"start": "2015-05-26",
"end": "2014-07-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:53.018 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:53.018 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RVUQEsCmcm3HIAwA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14955/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:53.018 [print] {
"resourceType": "MedicationAdministration",
"id": "14955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:57.741+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX09",
"display": "Thimopentin"
}
]
},
"effectivePeriod": {
"start": "2015-05-26",
"end": "2014-07-08"
}
}
> *
print COOKIES
10:28:53.018 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:53.018 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:53.018 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RVUQEsCmcm3HIAwA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14955/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:28:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:53.018 [print] {
"resourceType": "MedicationAdministration",
"id": "14955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:57.741+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX09",
"display": "Thimopentin"
}
]
},
"effectivePeriod": {
"start": "2015-05-26",
"end": "2014-07-08"
}
}
> *
print COOKIES
10:28:53.018 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:53.645 [print] {
"resourceType": "MedicationAdministration",
"id": "14955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:28:57.741+02:00",
"source": "#RVUQEsCmcm3HIAwA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX09",
"display": "Thimopentin"
}
]
},
"effectivePeriod": {
"start": "2015-05-26",
"end": "2014-07-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:54.281 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:54.910 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:28:58.997+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:28:58.997+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:54.910 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX32",
"display": "Bortezomib"
}
]
},
"effectivePeriod": {
"start": "2016-04-27",
"end": "2014-07-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:55.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:55.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"23Y2N6NwyIx7DyVP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14956/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:55.493 [print] {
"resourceType": "MedicationAdministration",
"id": "14956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:00.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX32",
"display": "Bortezomib"
}
]
},
"effectivePeriod": {
"start": "2016-04-27",
"end": "2014-07-09"
}
}
> *
print COOKIES
10:28:55.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:55.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:55.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"23Y2N6NwyIx7DyVP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14956/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:28:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:55.493 [print] {
"resourceType": "MedicationAdministration",
"id": "14956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:00.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX32",
"display": "Bortezomib"
}
]
},
"effectivePeriod": {
"start": "2016-04-27",
"end": "2014-07-09"
}
}
> *
print COOKIES
10:28:55.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:56.155 [print] {
"resourceType": "MedicationAdministration",
"id": "14956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:00.221+02:00",
"source": "#23Y2N6NwyIx7DyVP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX32",
"display": "Bortezomib"
}
]
},
"effectivePeriod": {
"start": "2016-04-27",
"end": "2014-07-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:56.847 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:57.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:01.574+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:01.574+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:57.479 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX04",
"display": "Pegademase"
}
]
},
"effectivePeriod": {
"start": "2016-07-06",
"end": "2014-10-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:58.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:58.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"S6Y3OpwqNrmeAJht"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14957/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:58.151 [print] {
"resourceType": "MedicationAdministration",
"id": "14957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:02.850+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX04",
"display": "Pegademase"
}
]
},
"effectivePeriod": {
"start": "2016-07-06",
"end": "2014-10-06"
}
}
> *
print COOKIES
10:28:58.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:28:58.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:28:58.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"S6Y3OpwqNrmeAJht"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14957/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:28:58.151 [print] {
"resourceType": "MedicationAdministration",
"id": "14957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:02.850+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX04",
"display": "Pegademase"
}
]
},
"effectivePeriod": {
"start": "2016-07-06",
"end": "2014-10-06"
}
}
> *
print COOKIES
10:28:58.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:28:58.737 [print] {
"resourceType": "MedicationAdministration",
"id": "14957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:02.850+02:00",
"source": "#S6Y3OpwqNrmeAJht",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX04",
"display": "Pegademase"
}
]
},
"effectivePeriod": {
"start": "2016-07-06",
"end": "2014-10-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:28:59.372 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:28:59.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:04.081+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:04.081+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:28:59.947 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA02",
"display": "Carboplatino"
}
]
},
"effectivePeriod": {
"start": "2016-08-11",
"end": "2014-10-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:00.564 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:00.564 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"is8gWNvOW2JTX4iD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14958/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:00.564 [print] {
"resourceType": "MedicationAdministration",
"id": "14958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:05.271+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA02",
"display": "Carboplatino"
}
]
},
"effectivePeriod": {
"start": "2016-08-11",
"end": "2014-10-21"
}
}
> *
print COOKIES
10:29:00.564 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:00.564 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:00.564 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"is8gWNvOW2JTX4iD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14958/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:00.564 [print] {
"resourceType": "MedicationAdministration",
"id": "14958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:05.271+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA02",
"display": "Carboplatino"
}
]
},
"effectivePeriod": {
"start": "2016-08-11",
"end": "2014-10-21"
}
}
> *
print COOKIES
10:29:00.564 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:01.165 [print] {
"resourceType": "MedicationAdministration",
"id": "14958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:05.271+02:00",
"source": "#is8gWNvOW2JTX4iD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA02",
"display": "Carboplatino"
}
]
},
"effectivePeriod": {
"start": "2016-08-11",
"end": "2014-10-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:02.113 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:02.768 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:06.784+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:06.784+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:02.768 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB04",
"display": "Cladribina"
}
]
},
"effectivePeriod": {
"start": "2016-09-19",
"end": "2015-02-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:03.355 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:03.355 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3DCqqQz0RkeCsp9H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14959/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:03.355 [print] {
"resourceType": "MedicationAdministration",
"id": "14959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:08.073+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB04",
"display": "Cladribina"
}
]
},
"effectivePeriod": {
"start": "2016-09-19",
"end": "2015-02-16"
}
}
> *
print COOKIES
10:29:03.355 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:03.355 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:03.355 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3DCqqQz0RkeCsp9H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14959/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:03.355 [print] {
"resourceType": "MedicationAdministration",
"id": "14959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:08.073+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB04",
"display": "Cladribina"
}
]
},
"effectivePeriod": {
"start": "2016-09-19",
"end": "2015-02-16"
}
}
> *
print COOKIES
10:29:03.355 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:03.926 [print] {
"resourceType": "MedicationAdministration",
"id": "14959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:08.073+02:00",
"source": "#3DCqqQz0RkeCsp9H",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB04",
"display": "Cladribina"
}
]
},
"effectivePeriod": {
"start": "2016-09-19",
"end": "2015-02-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:04.542 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:05.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:09.268+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:09.268+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:05.132 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX04",
"display": "Lenalidomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2015-02-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:05.765 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:05.765 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eyw0eBKCzKXMIsHp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14960/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:05.765 [print] {
"resourceType": "MedicationAdministration",
"id": "14960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:10.476+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX04",
"display": "Lenalidomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2015-02-27"
}
}
> *
print COOKIES
10:29:05.765 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:05.765 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:05.765 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eyw0eBKCzKXMIsHp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14960/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:05.765 [print] {
"resourceType": "MedicationAdministration",
"id": "14960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:10.476+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX04",
"display": "Lenalidomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2015-02-27"
}
}
> *
print COOKIES
10:29:05.765 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:06.389 [print] {
"resourceType": "MedicationAdministration",
"id": "14960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:10.476+02:00",
"source": "#eyw0eBKCzKXMIsHp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX04",
"display": "Lenalidomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2015-02-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:06.974 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:07.623 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:11.703+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:11.703+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:07.623 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX10",
"display": "Immunocianina"
}
]
},
"effectivePeriod": {
"start": "2016-12-23",
"end": "2015-07-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:08.240 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:08.240 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gc0p9gkkbsCUMZUB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14961/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:08.240 [print] {
"resourceType": "MedicationAdministration",
"id": "14961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:12.962+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX10",
"display": "Immunocianina"
}
]
},
"effectivePeriod": {
"start": "2016-12-23",
"end": "2015-07-10"
}
}
> *
print COOKIES
10:29:08.240 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:08.240 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:08.240 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gc0p9gkkbsCUMZUB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14961/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:08.240 [print] {
"resourceType": "MedicationAdministration",
"id": "14961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:12.962+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX10",
"display": "Immunocianina"
}
]
},
"effectivePeriod": {
"start": "2016-12-23",
"end": "2015-07-10"
}
}
> *
print COOKIES
10:29:08.240 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:08.810 [print] {
"resourceType": "MedicationAdministration",
"id": "14961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:12.962+02:00",
"source": "#gc0p9gkkbsCUMZUB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX10",
"display": "Immunocianina"
}
]
},
"effectivePeriod": {
"start": "2016-12-23",
"end": "2015-07-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:09.427 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:10.014 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:14.147+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:14.147+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:10.014 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC03",
"display": "Carboquone"
}
]
},
"effectivePeriod": {
"start": "2017-03-16",
"end": "2015-07-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:10.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:10.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9DBmPI4dypURkguZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14962/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:10.631 [print] {
"resourceType": "MedicationAdministration",
"id": "14962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:15.354+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC03",
"display": "Carboquone"
}
]
},
"effectivePeriod": {
"start": "2017-03-16",
"end": "2015-07-27"
}
}
> *
print COOKIES
10:29:10.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:10.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:10.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9DBmPI4dypURkguZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14962/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:10.631 [print] {
"resourceType": "MedicationAdministration",
"id": "14962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:15.354+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC03",
"display": "Carboquone"
}
]
},
"effectivePeriod": {
"start": "2017-03-16",
"end": "2015-07-27"
}
}
> *
print COOKIES
10:29:10.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:11.248 [print] {
"resourceType": "MedicationAdministration",
"id": "14962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:15.354+02:00",
"source": "#9DBmPI4dypURkguZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC03",
"display": "Carboquone"
}
]
},
"effectivePeriod": {
"start": "2017-03-16",
"end": "2015-07-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:11.819 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:12.467 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:16.548+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:16.548+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:12.467 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC06",
"display": "Capecitabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2015-10-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:13.038 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:13.038 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i8PqJLIBcomZsE1G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14963/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:13.038 [print] {
"resourceType": "MedicationAdministration",
"id": "14963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:17.766+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC06",
"display": "Capecitabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2015-10-01"
}
}
> *
print COOKIES
10:29:13.038 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:13.053 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:13.053 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i8PqJLIBcomZsE1G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14963/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:13.053 [print] {
"resourceType": "MedicationAdministration",
"id": "14963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:17.766+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC06",
"display": "Capecitabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2015-10-01"
}
}
> *
print COOKIES
10:29:13.053 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:13.655 [print] {
"resourceType": "MedicationAdministration",
"id": "14963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:17.766+02:00",
"source": "#i8PqJLIBcomZsE1G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC06",
"display": "Capecitabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2015-10-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:15.246 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:15.870 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:19.974+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:19.974+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:15.870 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD01",
"display": "Porfimer sodium"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2016-03-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:16.502 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"644"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:16.502 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TkgtdRl48Dho4GpY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14964/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:16.502 [print] {
"resourceType": "MedicationAdministration",
"id": "14964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:21.220+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD01",
"display": "Porfimer sodium"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2016-03-29"
}
}
> *
print COOKIES
10:29:16.502 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:16.502 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"644"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:16.502 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TkgtdRl48Dho4GpY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14964/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:16.502 [print] {
"resourceType": "MedicationAdministration",
"id": "14964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:21.220+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD01",
"display": "Porfimer sodium"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2016-03-29"
}
}
> *
print COOKIES
10:29:16.502 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:17.073 [print] {
"resourceType": "MedicationAdministration",
"id": "14964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:21.220+02:00",
"source": "#TkgtdRl48Dho4GpY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD01",
"display": "Porfimer sodium"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2016-03-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:17.707 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:18.292 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:22.428+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:22.428+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:18.292 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC07",
"display": "Tocilizumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2016-05-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:18.893 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:18.893 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZDIDqE06s6oB5MAp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14965/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:18.893 [print] {
"resourceType": "MedicationAdministration",
"id": "14965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:23.629+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC07",
"display": "Tocilizumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2016-05-18"
}
}
> *
print COOKIES
10:29:18.893 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:18.893 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:18.893 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZDIDqE06s6oB5MAp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14965/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:18.893 [print] {
"resourceType": "MedicationAdministration",
"id": "14965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:23.629+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC07",
"display": "Tocilizumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2016-05-18"
}
}
> *
print COOKIES
10:29:18.893 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:19.495 [print] {
"resourceType": "MedicationAdministration",
"id": "14965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:23.629+02:00",
"source": "#ZDIDqE06s6oB5MAp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC07",
"display": "Tocilizumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2016-05-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:20.081 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 18ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 18ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:20.714 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:24.809+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:24.809+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:20.714 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX08",
"display": "Poly ICLC"
}
]
},
"effectivePeriod": {
"start": "2017-08-14",
"end": "2016-06-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:21.362 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:21.362 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F3ygS40O4Ie8Jh8A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14966/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:21.362 [print] {
"resourceType": "MedicationAdministration",
"id": "14966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:26.074+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX08",
"display": "Poly ICLC"
}
]
},
"effectivePeriod": {
"start": "2017-08-14",
"end": "2016-06-22"
}
}
> *
print COOKIES
10:29:21.362 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:21.362 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:21.362 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F3ygS40O4Ie8Jh8A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14966/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:21.362 [print] {
"resourceType": "MedicationAdministration",
"id": "14966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:26.074+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX08",
"display": "Poly ICLC"
}
]
},
"effectivePeriod": {
"start": "2017-08-14",
"end": "2016-06-22"
}
}
> *
print COOKIES
10:29:21.362 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:22.002 [print] {
"resourceType": "MedicationAdministration",
"id": "14966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:26.074+02:00",
"source": "#F3ygS40O4Ie8Jh8A",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX08",
"display": "Poly ICLC"
}
]
},
"effectivePeriod": {
"start": "2017-08-14",
"end": "2016-06-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:22.619 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:23.242 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:27.344+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:27.344+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:23.242 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX40",
"display": "Omacetaxine mepesuccinate"
}
]
},
"effectivePeriod": {
"start": "2017-08-29",
"end": "2016-07-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:23.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"654"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:23.822 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gl3nYTcsmTaFqn3U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14967/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:23.822 [print] {
"resourceType": "MedicationAdministration",
"id": "14967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:28.544+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX40",
"display": "Omacetaxine mepesuccinate"
}
]
},
"effectivePeriod": {
"start": "2017-08-29",
"end": "2016-07-29"
}
}
> *
print COOKIES
10:29:23.822 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:23.838 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"654"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:23.838 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gl3nYTcsmTaFqn3U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14967/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:23.838 [print] {
"resourceType": "MedicationAdministration",
"id": "14967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:28.544+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX40",
"display": "Omacetaxine mepesuccinate"
}
]
},
"effectivePeriod": {
"start": "2017-08-29",
"end": "2016-07-29"
}
}
> *
print COOKIES
10:29:23.838 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:24.392 [print] {
"resourceType": "MedicationAdministration",
"id": "14967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:28.544+02:00",
"source": "#gl3nYTcsmTaFqn3U",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX40",
"display": "Omacetaxine mepesuccinate"
}
]
},
"effectivePeriod": {
"start": "2017-08-29",
"end": "2016-07-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:25.009 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:25.664 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:29.742+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:29.742+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:25.664 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX44",
"display": "Aflibercept"
}
]
},
"effectivePeriod": {
"start": "2017-10-19",
"end": "2017-01-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:26.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:26.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u1xvYHcNVQcn1QyY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14968/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:26.244 [print] {
"resourceType": "MedicationAdministration",
"id": "14968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:30.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX44",
"display": "Aflibercept"
}
]
},
"effectivePeriod": {
"start": "2017-10-19",
"end": "2017-01-31"
}
}
> *
print COOKIES
10:29:26.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:26.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:26.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u1xvYHcNVQcn1QyY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14968/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:26.244 [print] {
"resourceType": "MedicationAdministration",
"id": "14968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:30.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX44",
"display": "Aflibercept"
}
]
},
"effectivePeriod": {
"start": "2017-10-19",
"end": "2017-01-31"
}
}
> *
print COOKIES
10:29:26.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:26.859 [print] {
"resourceType": "MedicationAdministration",
"id": "14968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:30.967+02:00",
"source": "#u1xvYHcNVQcn1QyY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX44",
"display": "Aflibercept"
}
]
},
"effectivePeriod": {
"start": "2017-10-19",
"end": "2017-01-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:27.477 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:28.078 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:32.201+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:32.201+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:28.078 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB09",
"display": "Valrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-11-17",
"end": "2017-06-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:28.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:28.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gBhl7Z2qAp7120oO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14969/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:28.701 [print] {
"resourceType": "MedicationAdministration",
"id": "14969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:33.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB09",
"display": "Valrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-11-17",
"end": "2017-06-06"
}
}
> *
print COOKIES
10:29:28.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:28.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:28.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gBhl7Z2qAp7120oO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14969/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:28.701 [print] {
"resourceType": "MedicationAdministration",
"id": "14969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:33.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB09",
"display": "Valrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-11-17",
"end": "2017-06-06"
}
}
> *
print COOKIES
10:29:28.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:29.603 [print] {
"resourceType": "MedicationAdministration",
"id": "14969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:33.424+02:00",
"source": "#gBhl7Z2qAp7120oO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB09",
"display": "Valrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-11-17",
"end": "2017-06-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:30.383 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:31.007 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:35.089+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:35.089+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:31.007 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA05",
"display": "Vinflunina"
}
]
},
"effectivePeriod": {
"start": "2012-10-09",
"end": "2013-03-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:31.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:31.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LIbaYZ461e2sKxow"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14970/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:31.603 [print] {
"resourceType": "MedicationAdministration",
"id": "14970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:36.311+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA05",
"display": "Vinflunina"
}
]
},
"effectivePeriod": {
"start": "2012-10-09",
"end": "2013-03-06"
}
}
> *
print COOKIES
10:29:31.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:31.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:31.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LIbaYZ461e2sKxow"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14970/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:31.603 [print] {
"resourceType": "MedicationAdministration",
"id": "14970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:36.311+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA05",
"display": "Vinflunina"
}
]
},
"effectivePeriod": {
"start": "2012-10-09",
"end": "2013-03-06"
}
}
> *
print COOKIES
10:29:31.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:32.303 [print] {
"resourceType": "MedicationAdministration",
"id": "14970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:36.311+02:00",
"source": "#LIbaYZ461e2sKxow",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA05",
"display": "Vinflunina"
}
]
},
"effectivePeriod": {
"start": "2012-10-09",
"end": "2013-03-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:32.890 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:33.476 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:37.620+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:37.620+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:33.476 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX07",
"display": "lonidamina"
}
]
},
"effectivePeriod": {
"start": "2013-03-25",
"end": "2013-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:34.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:34.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hWsSQxK3EVGuEe9b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14971/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:34.146 [print] {
"resourceType": "MedicationAdministration",
"id": "14971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:38.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX07",
"display": "lonidamina"
}
]
},
"effectivePeriod": {
"start": "2013-03-25",
"end": "2013-05-16"
}
}
> *
print COOKIES
10:29:34.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:34.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:34.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hWsSQxK3EVGuEe9b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14971/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:34.146 [print] {
"resourceType": "MedicationAdministration",
"id": "14971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:38.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX07",
"display": "lonidamina"
}
]
},
"effectivePeriod": {
"start": "2013-03-25",
"end": "2013-05-16"
}
}
> *
print COOKIES
10:29:34.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:35.049 [print] {
"resourceType": "MedicationAdministration",
"id": "14971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:38.821+02:00",
"source": "#hWsSQxK3EVGuEe9b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX07",
"display": "lonidamina"
}
]
},
"effectivePeriod": {
"start": "2013-03-25",
"end": "2013-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:35.683 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:36.268 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:40.409+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:40.409+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:36.268 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE17",
"display": "Axitinib"
}
]
},
"effectivePeriod": {
"start": "2013-04-19",
"end": "2013-08-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:36.932 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:36.932 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"njmP4bU1kPSsB9D7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14972/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:36.932 [print] {
"resourceType": "MedicationAdministration",
"id": "14972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:41.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE17",
"display": "Axitinib"
}
]
},
"effectivePeriod": {
"start": "2013-04-19",
"end": "2013-08-15"
}
}
> *
print COOKIES
10:29:36.932 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:36.932 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:36.932 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"njmP4bU1kPSsB9D7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14972/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:36.932 [print] {
"resourceType": "MedicationAdministration",
"id": "14972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:41.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE17",
"display": "Axitinib"
}
]
},
"effectivePeriod": {
"start": "2013-04-19",
"end": "2013-08-15"
}
}
> *
print COOKIES
10:29:36.932 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:37.597 [print] {
"resourceType": "MedicationAdministration",
"id": "14972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:41.632+02:00",
"source": "#njmP4bU1kPSsB9D7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE17",
"display": "Axitinib"
}
]
},
"effectivePeriod": {
"start": "2013-04-19",
"end": "2013-08-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:38.262 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:38.957 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:42.983+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:42.983+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:38.957 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB13",
"display": "Peginterferone beta 1a"
}
]
},
"effectivePeriod": {
"start": "2013-09-16",
"end": "2013-08-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:39.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:39.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rdL7Vza4XBw8yc6F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14973/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:39.561 [print] {
"resourceType": "MedicationAdministration",
"id": "14973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:44.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB13",
"display": "Peginterferone beta 1a"
}
]
},
"effectivePeriod": {
"start": "2013-09-16",
"end": "2013-08-26"
}
}
> *
print COOKIES
10:29:39.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:39.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:39.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rdL7Vza4XBw8yc6F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14973/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:39.561 [print] {
"resourceType": "MedicationAdministration",
"id": "14973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:44.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB13",
"display": "Peginterferone beta 1a"
}
]
},
"effectivePeriod": {
"start": "2013-09-16",
"end": "2013-08-26"
}
}
> *
print COOKIES
10:29:39.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:40.225 [print] {
"resourceType": "MedicationAdministration",
"id": "14973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:44.276+02:00",
"source": "#rdL7Vza4XBw8yc6F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB13",
"display": "Peginterferone beta 1a"
}
]
},
"effectivePeriod": {
"start": "2013-09-16",
"end": "2013-08-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:40.850 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:41.423 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:45.562+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:45.562+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:41.423 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB04",
"display": "Adalimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-18",
"end": "2013-08-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:42.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:42.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TUFHRE17mco93jNu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14974/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:42.036 [print] {
"resourceType": "MedicationAdministration",
"id": "14974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:46.754+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB04",
"display": "Adalimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-18",
"end": "2013-08-29"
}
}
> *
print COOKIES
10:29:42.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:42.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:42.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TUFHRE17mco93jNu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14974/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:42.036 [print] {
"resourceType": "MedicationAdministration",
"id": "14974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:46.754+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB04",
"display": "Adalimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-18",
"end": "2013-08-29"
}
}
> *
print COOKIES
10:29:42.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:42.649 [print] {
"resourceType": "MedicationAdministration",
"id": "14974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:46.754+02:00",
"source": "#TUFHRE17mco93jNu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB04",
"display": "Adalimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-18",
"end": "2013-08-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:43.275 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:43.927 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:47.979+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:47.979+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:43.927 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA29",
"display": "Tofacitinib"
}
]
},
"effectivePeriod": {
"start": "2014-06-16",
"end": "2013-11-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:44.530 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:44.530 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HdCjiAjIC8I6UaEn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14975/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:44.530 [print] {
"resourceType": "MedicationAdministration",
"id": "14975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:49.252+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA29",
"display": "Tofacitinib"
}
]
},
"effectivePeriod": {
"start": "2014-06-16",
"end": "2013-11-29"
}
}
> *
print COOKIES
10:29:44.530 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:44.530 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:44.530 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HdCjiAjIC8I6UaEn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14975/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:44.530 [print] {
"resourceType": "MedicationAdministration",
"id": "14975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:49.252+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA29",
"display": "Tofacitinib"
}
]
},
"effectivePeriod": {
"start": "2014-06-16",
"end": "2013-11-29"
}
}
> *
print COOKIES
10:29:44.530 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:45.175 [print] {
"resourceType": "MedicationAdministration",
"id": "14975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:49.252+02:00",
"source": "#HdCjiAjIC8I6UaEn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA29",
"display": "Tofacitinib"
}
]
},
"effectivePeriod": {
"start": "2014-06-16",
"end": "2013-11-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:45.784 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:46.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:50.494+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:50.494+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:46.368 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB07",
"display": "Mitoxantrone"
}
]
},
"effectivePeriod": {
"start": "2014-12-09",
"end": "2014-01-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:47.021 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:47.021 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V5EZnxKReExyf7nb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14976/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:47.021 [print] {
"resourceType": "MedicationAdministration",
"id": "14976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:51.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB07",
"display": "Mitoxantrone"
}
]
},
"effectivePeriod": {
"start": "2014-12-09",
"end": "2014-01-14"
}
}
> *
print COOKIES
10:29:47.021 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:47.021 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:47.021 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V5EZnxKReExyf7nb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14976/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:47.021 [print] {
"resourceType": "MedicationAdministration",
"id": "14976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:51.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB07",
"display": "Mitoxantrone"
}
]
},
"effectivePeriod": {
"start": "2014-12-09",
"end": "2014-01-14"
}
}
> *
print COOKIES
10:29:47.021 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:47.603 [print] {
"resourceType": "MedicationAdministration",
"id": "14976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:51.731+02:00",
"source": "#V5EZnxKReExyf7nb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB07",
"display": "Mitoxantrone"
}
]
},
"effectivePeriod": {
"start": "2014-12-09",
"end": "2014-01-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:48.230 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:48.849 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:52.953+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:52.953+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:48.849 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX38",
"display": "Vorinostat"
}
]
},
"effectivePeriod": {
"start": "2015-02-06",
"end": "2014-04-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:49.504 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:49.504 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jB3APdNUK1lVjH8F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14977/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:49.504 [print] {
"resourceType": "MedicationAdministration",
"id": "14977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:54.216+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX38",
"display": "Vorinostat"
}
]
},
"effectivePeriod": {
"start": "2015-02-06",
"end": "2014-04-01"
}
}
> *
print COOKIES
10:29:49.504 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:49.504 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:49.504 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jB3APdNUK1lVjH8F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14977/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:49.504 [print] {
"resourceType": "MedicationAdministration",
"id": "14977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:54.216+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX38",
"display": "Vorinostat"
}
]
},
"effectivePeriod": {
"start": "2015-02-06",
"end": "2014-04-01"
}
}
> *
print COOKIES
10:29:49.504 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:50.353 [print] {
"resourceType": "MedicationAdministration",
"id": "14977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:54.216+02:00",
"source": "#jB3APdNUK1lVjH8F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX38",
"display": "Vorinostat"
}
]
},
"effectivePeriod": {
"start": "2015-02-06",
"end": "2014-04-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:50.969 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:51.602 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:55.688+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:55.688+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:51.602 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA01",
"display": "Cisplatino"
}
]
},
"effectivePeriod": {
"start": "2015-05-07",
"end": "2014-07-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:52.228 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:52.228 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xY2ez0PpAFHuD181"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14978/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:52.228 [print] {
"resourceType": "MedicationAdministration",
"id": "14978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:56.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA01",
"display": "Cisplatino"
}
]
},
"effectivePeriod": {
"start": "2015-05-07",
"end": "2014-07-11"
}
}
> *
print COOKIES
10:29:52.228 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:52.228 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:52.228 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xY2ez0PpAFHuD181"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14978/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:52.228 [print] {
"resourceType": "MedicationAdministration",
"id": "14978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:56.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA01",
"display": "Cisplatino"
}
]
},
"effectivePeriod": {
"start": "2015-05-07",
"end": "2014-07-11"
}
}
> *
print COOKIES
10:29:52.228 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:52.861 [print] {
"resourceType": "MedicationAdministration",
"id": "14978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:56.937+02:00",
"source": "#xY2ez0PpAFHuD181",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA01",
"display": "Cisplatino"
}
]
},
"effectivePeriod": {
"start": "2015-05-07",
"end": "2014-07-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:53.632 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:54.249 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:29:58.358+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:29:58.358+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:54.265 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX06",
"display": "Pomalidomide"
}
]
},
"effectivePeriod": {
"start": "2015-05-25",
"end": "2014-09-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:54.967 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:54.967 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0rhGXN8Uzs7nJ42o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14979/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:54.967 [print] {
"resourceType": "MedicationAdministration",
"id": "14979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:59.651+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX06",
"display": "Pomalidomide"
}
]
},
"effectivePeriod": {
"start": "2015-05-25",
"end": "2014-09-03"
}
}
> *
print COOKIES
10:29:54.967 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:54.967 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:54.967 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0rhGXN8Uzs7nJ42o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14979/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:29:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:29:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:54.967 [print] {
"resourceType": "MedicationAdministration",
"id": "14979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:59.651+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX06",
"display": "Pomalidomide"
}
]
},
"effectivePeriod": {
"start": "2015-05-25",
"end": "2014-09-03"
}
}
> *
print COOKIES
10:29:54.967 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:55.638 [print] {
"resourceType": "MedicationAdministration",
"id": "14979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:29:59.651+02:00",
"source": "#0rhGXN8Uzs7nJ42o",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX06",
"display": "Pomalidomide"
}
]
},
"effectivePeriod": {
"start": "2015-05-25",
"end": "2014-09-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:56.343 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:56.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:01.064+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:01.064+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:56.961 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB05",
"display": "Interferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-05-29",
"end": "2015-03-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:57.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:57.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wMUJXOTy8cXXF2WQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14980/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:57.641 [print] {
"resourceType": "MedicationAdministration",
"id": "14980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:02.350+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB05",
"display": "Interferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-05-29",
"end": "2015-03-16"
}
}
> *
print COOKIES
10:29:57.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:29:57.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:29:57.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wMUJXOTy8cXXF2WQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14980/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:29:57.641 [print] {
"resourceType": "MedicationAdministration",
"id": "14980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:02.350+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB05",
"display": "Interferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-05-29",
"end": "2015-03-16"
}
}
> *
print COOKIES
10:29:57.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:29:58.249 [print] {
"resourceType": "MedicationAdministration",
"id": "14980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:02.350+02:00",
"source": "#wMUJXOTy8cXXF2WQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB05",
"display": "Interferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-05-29",
"end": "2015-03-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:29:59.165 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:29:59.805 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:03.880+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:03.880+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:29:59.805 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE03",
"display": "Erlotinib "
}
]
},
"effectivePeriod": {
"start": "2015-07-23",
"end": "2015-04-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:00.422 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:00.422 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K0WcgXG8EfRlqP4m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14981/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:00.422 [print] {
"resourceType": "MedicationAdministration",
"id": "14981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:05.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE03",
"display": "Erlotinib "
}
]
},
"effectivePeriod": {
"start": "2015-07-23",
"end": "2015-04-07"
}
}
> *
print COOKIES
10:30:00.422 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:00.422 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:00.422 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K0WcgXG8EfRlqP4m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14981/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:00.422 [print] {
"resourceType": "MedicationAdministration",
"id": "14981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:05.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE03",
"display": "Erlotinib "
}
]
},
"effectivePeriod": {
"start": "2015-07-23",
"end": "2015-04-07"
}
}
> *
print COOKIES
10:30:00.422 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:01.008 [print] {
"resourceType": "MedicationAdministration",
"id": "14981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:05.136+02:00",
"source": "#K0WcgXG8EfRlqP4m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE03",
"display": "Erlotinib "
}
]
},
"effectivePeriod": {
"start": "2015-07-23",
"end": "2015-04-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:01.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:02.214 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:06.314+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:06.314+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:02.214 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD04",
"display": "Cabazitaxel"
}
]
},
"effectivePeriod": {
"start": "2015-09-22",
"end": "2015-07-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:03.208 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:03.208 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f5xIEvV3ta4BKqxf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14982/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:03.208 [print] {
"resourceType": "MedicationAdministration",
"id": "14982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:07.906+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD04",
"display": "Cabazitaxel"
}
]
},
"effectivePeriod": {
"start": "2015-09-22",
"end": "2015-07-13"
}
}
> *
print COOKIES
10:30:03.208 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:03.208 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:03.208 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f5xIEvV3ta4BKqxf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14982/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:03.208 [print] {
"resourceType": "MedicationAdministration",
"id": "14982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:07.906+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD04",
"display": "Cabazitaxel"
}
]
},
"effectivePeriod": {
"start": "2015-09-22",
"end": "2015-07-13"
}
}
> *
print COOKIES
10:30:03.208 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:03.793 [print] {
"resourceType": "MedicationAdministration",
"id": "14982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:07.906+02:00",
"source": "#f5xIEvV3ta4BKqxf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD04",
"display": "Cabazitaxel"
}
]
},
"effectivePeriod": {
"start": "2015-09-22",
"end": "2015-07-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:04.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:05.276 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:09.206+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:09.206+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:05.276 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE01",
"display": "Imatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-08-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:05.866 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:05.866 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cdnZ6QD6DvllCw27"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14983/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:05.866 [print] {
"resourceType": "MedicationAdministration",
"id": "14983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:10.578+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE01",
"display": "Imatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-08-04"
}
}
> *
print COOKIES
10:30:05.866 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:05.866 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:05.866 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cdnZ6QD6DvllCw27"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14983/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:05.866 [print] {
"resourceType": "MedicationAdministration",
"id": "14983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:10.578+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE01",
"display": "Imatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-08-04"
}
}
> *
print COOKIES
10:30:05.866 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:06.436 [print] {
"resourceType": "MedicationAdministration",
"id": "14983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:10.578+02:00",
"source": "#cdnZ6QD6DvllCw27",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE01",
"display": "Imatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-08-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:07.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:07.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:11.783+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:11.783+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:07.628 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX09",
"display": "Milteforina"
}
]
},
"effectivePeriod": {
"start": "2015-09-24",
"end": "2015-10-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:08.245 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:08.245 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UTiOZzQG2KIAhkwt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14984/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:08.245 [print] {
"resourceType": "MedicationAdministration",
"id": "14984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:12.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX09",
"display": "Milteforina"
}
]
},
"effectivePeriod": {
"start": "2015-09-24",
"end": "2015-10-05"
}
}
> *
print COOKIES
10:30:08.245 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:08.245 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:08.245 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UTiOZzQG2KIAhkwt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14984/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:08.245 [print] {
"resourceType": "MedicationAdministration",
"id": "14984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:12.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX09",
"display": "Milteforina"
}
]
},
"effectivePeriod": {
"start": "2015-09-24",
"end": "2015-10-05"
}
}
> *
print COOKIES
10:30:08.245 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:08.878 [print] {
"resourceType": "MedicationAdministration",
"id": "14984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:12.961+02:00",
"source": "#UTiOZzQG2KIAhkwt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX09",
"display": "Milteforina"
}
]
},
"effectivePeriod": {
"start": "2015-09-24",
"end": "2015-10-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:09.521 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:10.154 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:14.237+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:14.237+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:10.154 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX42",
"display": "Panobinostat"
}
]
},
"effectivePeriod": {
"start": "2015-10-13",
"end": "2015-12-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:10.787 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:10.787 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"apu5lGmW4iJeMn2J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14985/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:10.787 [print] {
"resourceType": "MedicationAdministration",
"id": "14985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:15.511+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX42",
"display": "Panobinostat"
}
]
},
"effectivePeriod": {
"start": "2015-10-13",
"end": "2015-12-11"
}
}
> *
print COOKIES
10:30:10.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:10.787 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:10.787 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"apu5lGmW4iJeMn2J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14985/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:10.787 [print] {
"resourceType": "MedicationAdministration",
"id": "14985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:15.511+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX42",
"display": "Panobinostat"
}
]
},
"effectivePeriod": {
"start": "2015-10-13",
"end": "2015-12-11"
}
}
> *
print COOKIES
10:30:10.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:11.389 [print] {
"resourceType": "MedicationAdministration",
"id": "14985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:15.511+02:00",
"source": "#apu5lGmW4iJeMn2J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX42",
"display": "Panobinostat"
}
]
},
"effectivePeriod": {
"start": "2015-10-13",
"end": "2015-12-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:12.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:12.953 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:16.757+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:16.757+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:12.953 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA33",
"display": "Vedolizumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-15",
"end": "2015-12-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:13.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:13.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OhxbkxzPv2ob0pX2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14986/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:13.568 [print] {
"resourceType": "MedicationAdministration",
"id": "14986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:18.277+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA33",
"display": "Vedolizumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-15",
"end": "2015-12-29"
}
}
> *
print COOKIES
10:30:13.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:13.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:13.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OhxbkxzPv2ob0pX2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14986/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:13.568 [print] {
"resourceType": "MedicationAdministration",
"id": "14986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:18.277+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA33",
"display": "Vedolizumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-15",
"end": "2015-12-29"
}
}
> *
print COOKIES
10:30:13.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:14.470 [print] {
"resourceType": "MedicationAdministration",
"id": "14986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:18.277+02:00",
"source": "#OhxbkxzPv2ob0pX2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA33",
"display": "Vedolizumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-15",
"end": "2015-12-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:15.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:15.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:19.833+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:19.833+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:15.731 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX19",
"display": "Irinotecan "
}
]
},
"effectivePeriod": {
"start": "2015-11-16",
"end": "2016-01-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:17.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:17.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NEjlnEGH4n5ToCUj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14987/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:17.554 [print] {
"resourceType": "MedicationAdministration",
"id": "14987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:22.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX19",
"display": "Irinotecan "
}
]
},
"effectivePeriod": {
"start": "2015-11-16",
"end": "2016-01-05"
}
}
> *
print COOKIES
10:30:17.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:17.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:17.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NEjlnEGH4n5ToCUj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14987/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:17.554 [print] {
"resourceType": "MedicationAdministration",
"id": "14987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:22.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX19",
"display": "Irinotecan "
}
]
},
"effectivePeriod": {
"start": "2015-11-16",
"end": "2016-01-05"
}
}
> *
print COOKIES
10:30:17.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:18.155 [print] {
"resourceType": "MedicationAdministration",
"id": "14987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:22.060+02:00",
"source": "#NEjlnEGH4n5ToCUj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX19",
"display": "Irinotecan "
}
]
},
"effectivePeriod": {
"start": "2015-11-16",
"end": "2016-01-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:18.762 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:19.375 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:23.482+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:23.482+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:19.375 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB02",
"display": "Treosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-14",
"end": "2016-01-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:20.023 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:20.023 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tCQFCd1J9NtXUpX8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14988/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:20.023 [print] {
"resourceType": "MedicationAdministration",
"id": "14988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:24.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB02",
"display": "Treosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-14",
"end": "2016-01-26"
}
}
> *
print COOKIES
10:30:20.023 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:20.023 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:20.023 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tCQFCd1J9NtXUpX8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14988/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:20.023 [print] {
"resourceType": "MedicationAdministration",
"id": "14988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:24.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB02",
"display": "Treosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-14",
"end": "2016-01-26"
}
}
> *
print COOKIES
10:30:20.023 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:20.594 [print] {
"resourceType": "MedicationAdministration",
"id": "14988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:24.723+02:00",
"source": "#tCQFCd1J9NtXUpX8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB02",
"display": "Treosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-14",
"end": "2016-01-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:21.225 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:21.789 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:25.951+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:25.951+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:21.789 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB09",
"display": "Interferone alfacon-1"
}
]
},
"effectivePeriod": {
"start": "2016-01-21",
"end": "2016-02-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:22.422 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:22.422 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bPOPFrtmqLEcQIrq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14989/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:22.422 [print] {
"resourceType": "MedicationAdministration",
"id": "14989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:27.137+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB09",
"display": "Interferone alfacon-1"
}
]
},
"effectivePeriod": {
"start": "2016-01-21",
"end": "2016-02-11"
}
}
> *
print COOKIES
10:30:22.422 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:22.422 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:22.422 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bPOPFrtmqLEcQIrq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14989/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:22.422 [print] {
"resourceType": "MedicationAdministration",
"id": "14989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:27.137+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB09",
"display": "Interferone alfacon-1"
}
]
},
"effectivePeriod": {
"start": "2016-01-21",
"end": "2016-02-11"
}
}
> *
print COOKIES
10:30:22.422 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:23.024 [print] {
"resourceType": "MedicationAdministration",
"id": "14989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:27.137+02:00",
"source": "#bPOPFrtmqLEcQIrq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB09",
"display": "Interferone alfacon-1"
}
]
},
"effectivePeriod": {
"start": "2016-01-21",
"end": "2016-02-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:23.694 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:24.289 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:28.421+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:28.421+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:24.289 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC12",
"display": "Brentuximab vedotin"
}
]
},
"effectivePeriod": {
"start": "2016-08-17",
"end": "2016-08-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:24.912 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:24.912 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uvl4J1jz1cbg0187"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14990/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:24.912 [print] {
"resourceType": "MedicationAdministration",
"id": "14990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:29.633+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC12",
"display": "Brentuximab vedotin"
}
]
},
"effectivePeriod": {
"start": "2016-08-17",
"end": "2016-08-03"
}
}
> *
print COOKIES
10:30:24.912 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:24.912 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:24.912 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uvl4J1jz1cbg0187"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14990/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:24.912 [print] {
"resourceType": "MedicationAdministration",
"id": "14990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:29.633+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC12",
"display": "Brentuximab vedotin"
}
]
},
"effectivePeriod": {
"start": "2016-08-17",
"end": "2016-08-03"
}
}
> *
print COOKIES
10:30:24.912 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:25.491 [print] {
"resourceType": "MedicationAdministration",
"id": "14990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:29.633+02:00",
"source": "#uvl4J1jz1cbg0187",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC12",
"display": "Brentuximab vedotin"
}
]
},
"effectivePeriod": {
"start": "2016-08-17",
"end": "2016-08-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:26.131 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:26.733 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:30.858+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:30.858+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:26.733 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB11",
"display": "Pixantrone"
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-10-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:27.465 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:27.465 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h7iqdVxa1VVxQYPU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14991/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:27.465 [print] {
"resourceType": "MedicationAdministration",
"id": "14991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:32.182+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB11",
"display": "Pixantrone"
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-10-24"
}
}
> *
print COOKIES
10:30:27.465 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:27.465 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:27.465 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h7iqdVxa1VVxQYPU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14991/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:27.465 [print] {
"resourceType": "MedicationAdministration",
"id": "14991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:32.182+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB11",
"display": "Pixantrone"
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-10-24"
}
}
> *
print COOKIES
10:30:27.465 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:28.060 [print] {
"resourceType": "MedicationAdministration",
"id": "14991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:32.182+02:00",
"source": "#h7iqdVxa1VVxQYPU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB11",
"display": "Pixantrone"
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-10-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:28.683 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:29.321 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:33.395+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:33.395+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:29.321 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX23",
"display": "Mitotano"
}
]
},
"effectivePeriod": {
"start": "2017-02-02",
"end": "2016-10-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:29.963 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:29.963 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PlhUbAZ031UXEnxO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14992/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:29.963 [print] {
"resourceType": "MedicationAdministration",
"id": "14992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:34.678+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX23",
"display": "Mitotano"
}
]
},
"effectivePeriod": {
"start": "2017-02-02",
"end": "2016-10-26"
}
}
> *
print COOKIES
10:30:29.963 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:29.978 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:29.978 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PlhUbAZ031UXEnxO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14992/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:29.978 [print] {
"resourceType": "MedicationAdministration",
"id": "14992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:34.678+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX23",
"display": "Mitotano"
}
]
},
"effectivePeriod": {
"start": "2017-02-02",
"end": "2016-10-26"
}
}
> *
print COOKIES
10:30:29.978 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:30.549 [print] {
"resourceType": "MedicationAdministration",
"id": "14992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:34.678+02:00",
"source": "#PlhUbAZ031UXEnxO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX23",
"display": "Mitotano"
}
]
},
"effectivePeriod": {
"start": "2017-02-02",
"end": "2016-10-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:31.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:31.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:36.122+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:36.122+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:31.961 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA28",
"display": "Belatacept"
}
]
},
"effectivePeriod": {
"start": "2017-02-21",
"end": "2017-07-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:32.577 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:32.577 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"krJiAYypYyC3C7bE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14993/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:32.577 [print] {
"resourceType": "MedicationAdministration",
"id": "14993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:37.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA28",
"display": "Belatacept"
}
]
},
"effectivePeriod": {
"start": "2017-02-21",
"end": "2017-07-19"
}
}
> *
print COOKIES
10:30:32.577 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:32.577 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:32.577 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"krJiAYypYyC3C7bE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14993/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:32.577 [print] {
"resourceType": "MedicationAdministration",
"id": "14993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:37.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA28",
"display": "Belatacept"
}
]
},
"effectivePeriod": {
"start": "2017-02-21",
"end": "2017-07-19"
}
}
> *
print COOKIES
10:30:32.577 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:33.165 [print] {
"resourceType": "MedicationAdministration",
"id": "14993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:37.300+02:00",
"source": "#krJiAYypYyC3C7bE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA28",
"display": "Belatacept"
}
]
},
"effectivePeriod": {
"start": "2017-02-21",
"end": "2017-07-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:33.777 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:34.456 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:38.504+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:38.504+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:34.456 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA02",
"display": "Stradurin"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2017-12-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:35.078 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:35.078 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fogzV3VdUNDOc6KC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14994/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:35.078 [print] {
"resourceType": "MedicationAdministration",
"id": "14994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:39.774+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA02",
"display": "Stradurin"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2017-12-14"
}
}
> *
print COOKIES
10:30:35.078 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:35.078 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:35.078 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fogzV3VdUNDOc6KC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14994/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:35.078 [print] {
"resourceType": "MedicationAdministration",
"id": "14994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:39.774+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA02",
"display": "Stradurin"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2017-12-14"
}
}
> *
print COOKIES
10:30:35.078 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:35.652 [print] {
"resourceType": "MedicationAdministration",
"id": "14994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:39.774+02:00",
"source": "#fogzV3VdUNDOc6KC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA02",
"display": "Stradurin"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2017-12-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:36.270 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:36.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:41.001+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:41.001+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:36.907 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC01",
"display": "Bleomicina "
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2015-09-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:37.518 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:37.518 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j8xUGqZZQF1c0xrJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14995/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:37.518 [print] {
"resourceType": "MedicationAdministration",
"id": "14995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:42.235+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC01",
"display": "Bleomicina "
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2015-09-11"
}
}
> *
print COOKIES
10:30:37.518 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:37.518 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:37.518 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j8xUGqZZQF1c0xrJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14995/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:37.518 [print] {
"resourceType": "MedicationAdministration",
"id": "14995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:42.235+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC01",
"display": "Bleomicina "
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2015-09-11"
}
}
> *
print COOKIES
10:30:37.518 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:38.121 [print] {
"resourceType": "MedicationAdministration",
"id": "14995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:42.235+02:00",
"source": "#j8xUGqZZQF1c0xrJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC01",
"display": "Bleomicina "
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2015-09-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:38.738 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:39.355 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:43.464+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:43.464+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:39.355 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA18",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2013-05-14",
"end": "2016-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:40.026 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:40.026 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p77Ao3HkJ6Z77lv8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14996/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:40.026 [print] {
"resourceType": "MedicationAdministration",
"id": "14996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:44.740+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA18",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2013-05-14",
"end": "2016-05-16"
}
}
> *
print COOKIES
10:30:40.026 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:40.026 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:40.026 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p77Ao3HkJ6Z77lv8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14996/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:40.026 [print] {
"resourceType": "MedicationAdministration",
"id": "14996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:44.740+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA18",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2013-05-14",
"end": "2016-05-16"
}
}
> *
print COOKIES
10:30:40.026 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:40.629 [print] {
"resourceType": "MedicationAdministration",
"id": "14996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:44.740+02:00",
"source": "#p77Ao3HkJ6Z77lv8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA18",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2013-05-14",
"end": "2016-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:41.236 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:41.869 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:45.968+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:45.968+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:41.869 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX17",
"display": "Sipuleucel-T"
}
]
},
"effectivePeriod": {
"start": "2013-07-03",
"end": "2016-05-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:42.456 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:42.456 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F5eNXX3IdHLsR43b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14997/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:42.456 [print] {
"resourceType": "MedicationAdministration",
"id": "14997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:47.185+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX17",
"display": "Sipuleucel-T"
}
]
},
"effectivePeriod": {
"start": "2013-07-03",
"end": "2016-05-23"
}
}
> *
print COOKIES
10:30:42.456 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:42.456 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:42.456 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F5eNXX3IdHLsR43b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14997/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:42.456 [print] {
"resourceType": "MedicationAdministration",
"id": "14997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:47.185+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX17",
"display": "Sipuleucel-T"
}
]
},
"effectivePeriod": {
"start": "2013-07-03",
"end": "2016-05-23"
}
}
> *
print COOKIES
10:30:42.456 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:43.176 [print] {
"resourceType": "MedicationAdministration",
"id": "14997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:47.185+02:00",
"source": "#F5eNXX3IdHLsR43b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX17",
"display": "Sipuleucel-T"
}
]
},
"effectivePeriod": {
"start": "2013-07-03",
"end": "2016-05-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:43.861 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:44.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:48.582+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:48.582+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:44.463 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB03",
"display": "Interferone gamma-1b"
}
]
},
"effectivePeriod": {
"start": "2014-01-15",
"end": "2016-06-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:45.096 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"649"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:45.096 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JTnn7Ojkd42lhcTb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14998/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:45.096 [print] {
"resourceType": "MedicationAdministration",
"id": "14998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:49.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB03",
"display": "Interferone gamma-1b"
}
]
},
"effectivePeriod": {
"start": "2014-01-15",
"end": "2016-06-21"
}
}
> *
print COOKIES
10:30:45.096 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:45.096 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"649"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:45.096 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JTnn7Ojkd42lhcTb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14998/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:45.096 [print] {
"resourceType": "MedicationAdministration",
"id": "14998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:49.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB03",
"display": "Interferone gamma-1b"
}
]
},
"effectivePeriod": {
"start": "2014-01-15",
"end": "2016-06-21"
}
}
> *
print COOKIES
10:30:45.096 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:45.698 [print] {
"resourceType": "MedicationAdministration",
"id": "14998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:49.806+02:00",
"source": "#JTnn7Ojkd42lhcTb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB03",
"display": "Interferone gamma-1b"
}
]
},
"effectivePeriod": {
"start": "2014-01-15",
"end": "2016-06-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:46.284 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:46.854 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:51.002+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:51.002+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:46.854 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC18",
"display": "Pembrolizumab"
}
]
},
"effectivePeriod": {
"start": "2014-06-20",
"end": "2016-07-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:47.471 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:47.471 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"abLlBIEK9iOqkJsM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14999/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:47.471 [print] {
"resourceType": "MedicationAdministration",
"id": "14999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:52.202+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC18",
"display": "Pembrolizumab"
}
]
},
"effectivePeriod": {
"start": "2014-06-20",
"end": "2016-07-06"
}
}
> *
print COOKIES
10:30:47.471 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:47.487 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:47.487 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"abLlBIEK9iOqkJsM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14999/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/14999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:47.487 [print] {
"resourceType": "MedicationAdministration",
"id": "14999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:52.202+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC18",
"display": "Pembrolizumab"
}
]
},
"effectivePeriod": {
"start": "2014-06-20",
"end": "2016-07-06"
}
}
> *
print COOKIES
10:30:47.487 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:48.324 [print] {
"resourceType": "MedicationAdministration",
"id": "14999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:52.202+02:00",
"source": "#abLlBIEK9iOqkJsM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC18",
"display": "Pembrolizumab"
}
]
},
"effectivePeriod": {
"start": "2014-06-20",
"end": "2016-07-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:48.995 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:49.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:53.723+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:53.723+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:49.628 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC05",
"display": "Gemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-08-19",
"end": "2016-12-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:50.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:50.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wXoXYEhNnotThvOW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15000/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:50.244 [print] {
"resourceType": "MedicationAdministration",
"id": "15000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:54.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC05",
"display": "Gemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-08-19",
"end": "2016-12-07"
}
}
> *
print COOKIES
10:30:50.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:50.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:50.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wXoXYEhNnotThvOW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15000/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:50.244 [print] {
"resourceType": "MedicationAdministration",
"id": "15000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:54.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC05",
"display": "Gemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-08-19",
"end": "2016-12-07"
}
}
> *
print COOKIES
10:30:50.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:50.868 [print] {
"resourceType": "MedicationAdministration",
"id": "15000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:54.967+02:00",
"source": "#wXoXYEhNnotThvOW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC05",
"display": "Gemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-08-19",
"end": "2016-12-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:51.469 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:52.071 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:56.182+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:56.182+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:52.071 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX47",
"display": "Idelalisib"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2017-02-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:52.693 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:52.693 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SqjLK3oNlwXor8Pw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15001/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:52.693 [print] {
"resourceType": "MedicationAdministration",
"id": "15001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:57.411+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX47",
"display": "Idelalisib"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2017-02-17"
}
}
> *
print COOKIES
10:30:52.693 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:52.693 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:52.693 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SqjLK3oNlwXor8Pw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15001/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:52.693 [print] {
"resourceType": "MedicationAdministration",
"id": "15001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:57.411+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX47",
"display": "Idelalisib"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2017-02-17"
}
}
> *
print COOKIES
10:30:52.693 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:53.357 [print] {
"resourceType": "MedicationAdministration",
"id": "15001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:57.411+02:00",
"source": "#SqjLK3oNlwXor8Pw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX47",
"display": "Idelalisib"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2017-02-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:53.996 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:54.582 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:30:58.706+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:30:58.706+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:54.582 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC04",
"display": "Rilonacept"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2017-03-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:55.162 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:55.162 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t4Fl9W5fkfKiD8ma"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15002/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:55.162 [print] {
"resourceType": "MedicationAdministration",
"id": "15002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:59.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC04",
"display": "Rilonacept"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2017-03-14"
}
}
> *
print COOKIES
10:30:55.162 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:55.162 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:55.162 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t4Fl9W5fkfKiD8ma"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15002/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:30:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:30:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:55.162 [print] {
"resourceType": "MedicationAdministration",
"id": "15002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:59.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC04",
"display": "Rilonacept"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2017-03-14"
}
}
> *
print COOKIES
10:30:55.162 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:55.767 [print] {
"resourceType": "MedicationAdministration",
"id": "15002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:30:59.888+02:00",
"source": "#t4Fl9W5fkfKiD8ma",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC04",
"display": "Rilonacept"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2017-03-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:56.394 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:56.973 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:31:01.117+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:31:01.117+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:56.973 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA03",
"display": "Raltitrexed"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2017-05-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:57.629 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:57.629 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lnVzXJofYvhRSgDQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15003/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:57.629 [print] {
"resourceType": "MedicationAdministration",
"id": "15003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:02.342+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA03",
"display": "Raltitrexed"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2017-05-01"
}
}
> *
print COOKIES
10:30:57.629 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:30:57.629 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:30:57.629 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lnVzXJofYvhRSgDQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15003/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:30:57.629 [print] {
"resourceType": "MedicationAdministration",
"id": "15003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:02.342+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA03",
"display": "Raltitrexed"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2017-05-01"
}
}
> *
print COOKIES
10:30:57.629 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:30:58.250 [print] {
"resourceType": "MedicationAdministration",
"id": "15003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:02.342+02:00",
"source": "#lnVzXJofYvhRSgDQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA03",
"display": "Raltitrexed"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2017-05-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:30:58.867 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:30:59.506 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:31:03.583+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:31:03.583+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:30:59.506 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC05",
"display": "Gemcitabina "
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2017-08-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:31:00.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:31:00.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xb45Bnu8oSnLemx3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15004/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:31:00.155 [print] {
"resourceType": "MedicationAdministration",
"id": "15004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:04.858+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC05",
"display": "Gemcitabina "
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2017-08-21"
}
}
> *
print COOKIES
10:31:00.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:31:00.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:31:00.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xb45Bnu8oSnLemx3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15004/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:31:00.155 [print] {
"resourceType": "MedicationAdministration",
"id": "15004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:04.858+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC05",
"display": "Gemcitabina "
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2017-08-21"
}
}
> *
print COOKIES
10:31:00.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:31:00.741 [print] {
"resourceType": "MedicationAdministration",
"id": "15004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:04.858+02:00",
"source": "#Xb45Bnu8oSnLemx3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC05",
"display": "Gemcitabina "
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2017-08-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:31:01.358 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:31:01.980 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:31:06.084+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:31:06.084+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:31:01.980 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE16",
"display": "Crizotinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-25",
"end": "2017-08-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:31:02.639 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:31:02.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZuDac8hoAwIqQ3Gc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15005/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:31:02.654 [print] {
"resourceType": "MedicationAdministration",
"id": "15005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:07.369+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE16",
"display": "Crizotinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-25",
"end": "2017-08-25"
}
}
> *
print COOKIES
10:31:02.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:31:02.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:31:02.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZuDac8hoAwIqQ3Gc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15005/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:31:02.654 [print] {
"resourceType": "MedicationAdministration",
"id": "15005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:07.369+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE16",
"display": "Crizotinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-25",
"end": "2017-08-25"
}
}
> *
print COOKIES
10:31:02.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:31:03.241 [print] {
"resourceType": "MedicationAdministration",
"id": "15005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:07.369+02:00",
"source": "#ZuDac8hoAwIqQ3Gc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE16",
"display": "Crizotinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-25",
"end": "2017-08-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:31:03.889 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:31:04.595 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:31:08.613+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:31:08.613+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:31:04.595 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE13",
"display": "Afatinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-14",
"end": "2017-09-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:31:05.238 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:31:05.238 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TMFyZsxnMQyscIoF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15006/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:31:05.238 [print] {
"resourceType": "MedicationAdministration",
"id": "15006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:09.968+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE13",
"display": "Afatinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-14",
"end": "2017-09-22"
}
}
> *
print COOKIES
10:31:05.238 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:31:05.253 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:31:05.253 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TMFyZsxnMQyscIoF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15006/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:31:05.253 [print] {
"resourceType": "MedicationAdministration",
"id": "15006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:09.968+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE13",
"display": "Afatinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-14",
"end": "2017-09-22"
}
}
> *
print COOKIES
10:31:05.253 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:31:05.839 [print] {
"resourceType": "MedicationAdministration",
"id": "15006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:09.968+02:00",
"source": "#TMFyZsxnMQyscIoF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE13",
"display": "Afatinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-14",
"end": "2017-09-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:31:06.440 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:31:07.042 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:31:11.161+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:31:11.161+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:31:07.042 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB03",
"display": "Tioguanina"
}
]
},
"effectivePeriod": {
"start": "2015-06-25",
"end": "2016-05-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:31:07.923 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:31:07.923 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pVWKhwo6MPR4HVDy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15007/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:31:07.923 [print] {
"resourceType": "MedicationAdministration",
"id": "15007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:12.644+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB03",
"display": "Tioguanina"
}
]
},
"effectivePeriod": {
"start": "2015-06-25",
"end": "2016-05-23"
}
}
> *
print COOKIES
10:31:07.923 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:31:07.923 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:31:07.923 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pVWKhwo6MPR4HVDy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15007/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:31:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/15007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:31:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:31:07.923 [print] {
"resourceType": "MedicationAdministration",
"id": "15007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:12.644+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB03",
"display": "Tioguanina"
}
]
},
"effectivePeriod": {
"start": "2015-06-25",
"end": "2016-05-23"
}
}
> *
print COOKIES
10:31:07.923 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:31:08.564 [print] {
"resourceType": "MedicationAdministration",
"id": "15007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:31:12.644+02:00",
"source": "#pVWKhwo6MPR4HVDy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB03",
"display": "Tioguanina"
}
]
},
"effectivePeriod": {
"start": "2015-06-25",
"end": "2016-05-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:31:09.149 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:31:10.735 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:31:13.874+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:31:13.874+02:00"
}
]
}